From 6d4528a224cf13e5c5ca2244e04e4421d585dc12 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 2 Jan 2024 19:42:41 +0100 Subject: [PATCH] new null-ls --- .config/nvim/lua/plugins/lsp/mason-lspconfig.lua | 2 +- .config/nvim/lua/plugins/lsp/null-ls.lua | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua b/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua index 7b21e71a1..66df3f8a5 100644 --- a/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua +++ b/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua @@ -22,7 +22,7 @@ M.keys = { } local opts = { - ensure_installed = { "lua_ls" }, + ensure_installed = { "lua_ls", "bashls" }, handlers = { function(server_name) require("lspconfig")[server_name].setup({}) diff --git a/.config/nvim/lua/plugins/lsp/null-ls.lua b/.config/nvim/lua/plugins/lsp/null-ls.lua index ef5c73cec..054ae88b8 100644 --- a/.config/nvim/lua/plugins/lsp/null-ls.lua +++ b/.config/nvim/lua/plugins/lsp/null-ls.lua @@ -1,4 +1,4 @@ -local M = { "jose-elias-alvarez/null-ls.nvim" } +local M = { "nvimtools/none-ls.nvim" } M.event = { "BufReadPre", "BufNewFile" } @@ -7,12 +7,17 @@ M.dependencies = { "mason.nvim" } M.opts = function() local nls = require("null-ls") return { - root_dir = require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git"), + root_dir = require("null-ls.utils").root_pattern(".null-ls-root", "Makefile", ".git"), sources = { - --nls.builtins.formatting.stylua, + -- shell nls.builtins.formatting.shfmt, + nls.builtins.code_actions.shellcheck, + -- python nls.builtins.formatting.black, - --nls.builtins.diagnostics.flake8, + -- perl + nls.builtins.formatting.perltidy, + -- Various (yaml, markdown, json among others) + nls.builtins.formatting.prettierd, }, } end