diff options
author | Luca Matei Pintilie <lucafulger@gmail.com> | 2023-01-10 18:39:41 +0000 |
---|---|---|
committer | Luca Matei Pintilie <lucafulger@gmail.com> | 2023-01-10 18:39:41 +0000 |
commit | 74de7af4d68e765a5f2641761bc78138e70e9725 (patch) | |
tree | 490aefb93f55406c413d631382bc426421cd0d15 /.config/nvim | |
parent | a3e63f3e49af6360665f6e5045ee9b599294b18d (diff) | |
download | dotfiles-74de7af4d68e765a5f2641761bc78138e70e9725.tar dotfiles-74de7af4d68e765a5f2641761bc78138e70e9725.tar.gz dotfiles-74de7af4d68e765a5f2641761bc78138e70e9725.tar.bz2 dotfiles-74de7af4d68e765a5f2641761bc78138e70e9725.tar.lz dotfiles-74de7af4d68e765a5f2641761bc78138e70e9725.tar.xz dotfiles-74de7af4d68e765a5f2641761bc78138e70e9725.tar.zst dotfiles-74de7af4d68e765a5f2641761bc78138e70e9725.zip |
Add null-ls to neovim
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/lua/lsp.lua | 23 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 9f9253a..ff46794 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -217,6 +217,29 @@ require("lspconfig").cssls.setup({ on_attach = on_attach; }) +local null_ls = require("null-ls") + +null_ls.setup({ + sources = { + null_ls.builtins.diagnostics.eslint, + null_ls.builtins.formatting.eslint, + null_ls.builtins.formatting.lua_format, + null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.rustfmt, + null_ls.builtins.code_actions.shellcheck, + null_ls.builtins.completion.spell, + null_ls.builtins.diagnostics.tsc, + null_ls.builtins.formatting.deno_fmt, + null_ls.builtins.code_actions.gitsigns.with({ + config = { + filter_actions = function(title) + return title:lower():match("blame") == nil -- filter out blame actions + end, + }, + }) + }, +}) + vim.diagnostic.config({ virtual_text = false; signs = true; diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 29ddc09..a6a411b 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -61,6 +61,7 @@ local PKGS = { { url = "https://github.com/ray-x/lsp_signature.nvim.git" }; { url = "https://github.com/Hoffs/omnisharp-extended-lsp.nvim.git" }; { url = "https://github.com/lewis6991/gitsigns.nvim.git" }; + { url = "https://github.com/jose-elias-alvarez/null-ls.nvim.git" }; -- Dev container { url = "https://codeberg.org/esensar/nvim-dev-container.git" }; |