rework config for 2.9.0, cleanup ts/lsp for now
This commit is contained in:
parent
c5ef20ddda
commit
f79f735f3b
87
init.lua
87
init.lua
@ -26,9 +26,7 @@ local config = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
-- Set colorscheme to use
|
-- Set colorscheme to use
|
||||||
--colorscheme = "default_theme",
|
colorscheme = "default_theme",
|
||||||
--colorscheme = "catppuccin",
|
|
||||||
colorscheme = "tokyonight-storm",
|
|
||||||
|
|
||||||
-- Add highlight groups in any theme
|
-- Add highlight groups in any theme
|
||||||
highlights = {
|
highlights = {
|
||||||
@ -39,7 +37,8 @@ local config = {
|
|||||||
-- Normal = { bg = "#000000" },
|
-- Normal = { bg = "#000000" },
|
||||||
-- },
|
-- },
|
||||||
},
|
},
|
||||||
-- set vim options here (vim.<first_key>.<second_key> = value)
|
|
||||||
|
-- set vim options here (vim.<first_key>.<second_key> = value)
|
||||||
options = {
|
options = {
|
||||||
opt = {
|
opt = {
|
||||||
-- set to true or false etc.
|
-- set to true or false etc.
|
||||||
@ -51,10 +50,13 @@ local config = {
|
|||||||
},
|
},
|
||||||
g = {
|
g = {
|
||||||
mapleader = " ", -- sets vim.g.mapleader
|
mapleader = " ", -- sets vim.g.mapleader
|
||||||
|
autoformat_enabled = true, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
|
||||||
cmp_enabled = true, -- enable completion at start
|
cmp_enabled = true, -- enable completion at start
|
||||||
autopairs_enabled = true, -- enable autopairs at start
|
autopairs_enabled = true, -- enable autopairs at start
|
||||||
diagnostics_enabled = true, -- enable diagnostics at start
|
diagnostics_enabled = true, -- enable diagnostics at start
|
||||||
status_diagnostics_enabled = true, -- enable diagnostics in statusline
|
status_diagnostics_enabled = true, -- enable diagnostics in statusline
|
||||||
|
icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing)
|
||||||
|
ui_notifications_enabled = true, -- disable notifications when toggling UI elements
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- If you need more control, you can use the function()...end notation
|
-- If you need more control, you can use the function()...end notation
|
||||||
@ -107,6 +109,7 @@ local config = {
|
|||||||
aerial = true,
|
aerial = true,
|
||||||
beacon = false,
|
beacon = false,
|
||||||
bufferline = true,
|
bufferline = true,
|
||||||
|
cmp = true,
|
||||||
dashboard = true,
|
dashboard = true,
|
||||||
highlighturl = true,
|
highlighturl = true,
|
||||||
hop = false,
|
hop = false,
|
||||||
@ -119,6 +122,7 @@ local config = {
|
|||||||
rainbow = true,
|
rainbow = true,
|
||||||
symbols_outline = false,
|
symbols_outline = false,
|
||||||
telescope = true,
|
telescope = true,
|
||||||
|
treesitter = true,
|
||||||
vimwiki = false,
|
vimwiki = false,
|
||||||
["which-key"] = true,
|
["which-key"] = true,
|
||||||
},
|
},
|
||||||
@ -137,9 +141,20 @@ local config = {
|
|||||||
-- "pyright"
|
-- "pyright"
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
disabled = { -- disable formatting capabilities for the listed clients
|
-- control auto formatting on save
|
||||||
|
format_on_save = {
|
||||||
|
enabled = false, -- enable or disable format on save globally
|
||||||
|
allow_filetypes = { -- enable format on save for specified filetypes only
|
||||||
|
-- "go",
|
||||||
|
},
|
||||||
|
ignore_filetypes = { -- disable format on save for specified filetypes
|
||||||
|
-- "python",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
disabled = { -- disable formatting capabilities for the listed language servers
|
||||||
-- "sumneko_lua",
|
-- "sumneko_lua",
|
||||||
},
|
},
|
||||||
|
timeout_ms = 1000, -- default format timeout
|
||||||
-- filter = function(client) -- fully override the default formatting function
|
-- filter = function(client) -- fully override the default formatting function
|
||||||
-- return true
|
-- return true
|
||||||
-- end
|
-- end
|
||||||
@ -216,14 +231,6 @@ local config = {
|
|||||||
-- end,
|
-- end,
|
||||||
-- },
|
-- },
|
||||||
|
|
||||||
-- We also support a key value style plugin definition similar to NvChad:
|
|
||||||
-- ["ray-x/lsp_signature.nvim"] = {
|
|
||||||
-- event = "BufRead",
|
|
||||||
-- config = function()
|
|
||||||
-- require("lsp_signature").setup()
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- themes
|
-- themes
|
||||||
{
|
{
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
@ -234,11 +241,19 @@ local config = {
|
|||||||
vim.api.nvim_command "colorscheme catppuccin"
|
vim.api.nvim_command "colorscheme catppuccin"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "folke/tokyonight.nvim" },
|
-- { "folke/tokyonight.nvim" }
|
||||||
|
|
||||||
|
-- We also support a key value style plugin definition similar to NvChad:
|
||||||
|
-- ["ray-x/lsp_signature.nvim"] = {
|
||||||
|
-- event = "BufRead",
|
||||||
|
-- config = function()
|
||||||
|
-- require("lsp_signature").setup()
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
},
|
},
|
||||||
-- All other entries override the require("<key>").setup({...}) call for default plugins
|
-- All other entries override the require("<key>").setup({...}) call for default plugins
|
||||||
["null-ls"] = function(config) -- overrides `require("null-ls").setup(config)`
|
["null-ls"] = function(config) -- overrides `require("null-ls").setup(config)`
|
||||||
-- config variable is the default configuration table for the setup functino call
|
-- config variable is the default configuration table for the setup function call
|
||||||
-- local null_ls = require "null-ls"
|
-- local null_ls = require "null-ls"
|
||||||
|
|
||||||
-- Check supported formatters and linters
|
-- Check supported formatters and linters
|
||||||
@ -256,50 +271,28 @@ local config = {
|
|||||||
},
|
},
|
||||||
-- use mason-lspconfig to configure LSP installations
|
-- use mason-lspconfig to configure LSP installations
|
||||||
["mason-lspconfig"] = { -- overrides `require("mason-lspconfig").setup(...)`
|
["mason-lspconfig"] = { -- overrides `require("mason-lspconfig").setup(...)`
|
||||||
-- see https://github.com/williamboman/mason-lspconfig.nvim for the available servers list
|
-- ensure_installed = { "sumneko_lua" },
|
||||||
ensure_installed = {
|
|
||||||
"ansiblels",
|
|
||||||
"arduino_language_server",
|
|
||||||
"bashls",
|
|
||||||
"clangd",
|
|
||||||
"cmake",
|
|
||||||
"cssls",
|
|
||||||
"dockerls",
|
|
||||||
"gopls",
|
|
||||||
"html",
|
|
||||||
"jsonls",
|
|
||||||
"lemminx",
|
|
||||||
"marksman",
|
|
||||||
"perlnavigator",
|
|
||||||
"pyright",
|
|
||||||
"quick_lint_js",
|
|
||||||
"sqlls",
|
|
||||||
"sumneko_lua",
|
|
||||||
"taplo",
|
|
||||||
"yamlls",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
|
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
|
||||||
["mason-null-ls"] = { -- overrides `require("mason-null-ls").setup(...)`
|
["mason-null-ls"] = { -- overrides `require("mason-null-ls").setup(...)`
|
||||||
-- see https://github.com/jayp0521/mason-null-ls.nvim for the available sources
|
-- ensure_installed = { "prettier", "stylua" },
|
||||||
ensure_installed = {
|
},
|
||||||
"gitlint",
|
["mason-nvim-dap"] = { -- overrides `require("mason-nvim-dap").setup(...)`
|
||||||
"hadolint",
|
-- ensure_installed = { "python" },
|
||||||
"prettier",
|
|
||||||
"shellcheck",
|
|
||||||
"stylua",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- LuaSnip Options
|
-- LuaSnip Options
|
||||||
luasnip = {
|
luasnip = {
|
||||||
-- Add paths for including more VS Code style snippets in luasnip
|
|
||||||
vscode_snippet_paths = {},
|
|
||||||
-- Extend filetypes
|
-- Extend filetypes
|
||||||
filetype_extend = {
|
filetype_extend = {
|
||||||
-- javascript = { "javascriptreact" },
|
-- javascript = { "javascriptreact" },
|
||||||
},
|
},
|
||||||
|
-- Configure luasnip loaders (vscode, lua, and/or snipmate)
|
||||||
|
vscode = {
|
||||||
|
-- Add paths for including more VS Code style snippets in luasnip
|
||||||
|
paths = {},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- CMP Source Priorities
|
-- CMP Source Priorities
|
||||||
|
Loading…
Reference in New Issue
Block a user