rework config for 2.9.0, cleanup ts/lsp for now

This commit is contained in:
Flo 2022-12-11 22:18:53 +01:00
parent c5ef20ddda
commit f79f735f3b

View File

@ -26,9 +26,7 @@ local config = {
},
-- Set colorscheme to use
--colorscheme = "default_theme",
--colorscheme = "catppuccin",
colorscheme = "tokyonight-storm",
colorscheme = "default_theme",
-- Add highlight groups in any theme
highlights = {
@ -39,7 +37,8 @@ local config = {
-- Normal = { bg = "#000000" },
-- },
},
-- set vim options here (vim.<first_key>.<second_key> = value)
-- set vim options here (vim.<first_key>.<second_key> = value)
options = {
opt = {
-- set to true or false etc.
@ -51,10 +50,13 @@ local config = {
},
g = {
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
autopairs_enabled = true, -- enable autopairs at start
diagnostics_enabled = true, -- enable diagnostics at start
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
@ -107,6 +109,7 @@ local config = {
aerial = true,
beacon = false,
bufferline = true,
cmp = true,
dashboard = true,
highlighturl = true,
hop = false,
@ -119,6 +122,7 @@ local config = {
rainbow = true,
symbols_outline = false,
telescope = true,
treesitter = true,
vimwiki = false,
["which-key"] = true,
},
@ -137,9 +141,20 @@ local config = {
-- "pyright"
},
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",
},
timeout_ms = 1000, -- default format timeout
-- filter = function(client) -- fully override the default formatting function
-- return true
-- end
@ -216,14 +231,6 @@ local config = {
-- 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
{
"catppuccin/nvim",
@ -234,11 +241,19 @@ local config = {
vim.api.nvim_command "colorscheme catppuccin"
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
["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"
-- Check supported formatters and linters
@ -256,50 +271,28 @@ local config = {
},
-- use mason-lspconfig to configure LSP installations
["mason-lspconfig"] = { -- overrides `require("mason-lspconfig").setup(...)`
-- see https://github.com/williamboman/mason-lspconfig.nvim for the available servers list
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",
},
-- ensure_installed = { "sumneko_lua" },
},
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
["mason-null-ls"] = { -- overrides `require("mason-null-ls").setup(...)`
-- see https://github.com/jayp0521/mason-null-ls.nvim for the available sources
ensure_installed = {
"gitlint",
"hadolint",
"prettier",
"shellcheck",
"stylua",
},
-- ensure_installed = { "prettier", "stylua" },
},
["mason-nvim-dap"] = { -- overrides `require("mason-nvim-dap").setup(...)`
-- ensure_installed = { "python" },
},
},
-- LuaSnip Options
luasnip = {
-- Add paths for including more VS Code style snippets in luasnip
vscode_snippet_paths = {},
-- Extend filetypes
filetype_extend = {
-- 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