diff --git a/.cspell.json b/.cspell.json deleted file mode 100644 index 91a3d25..0000000 --- a/.cspell.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"0.2","language":"en-GB","words":["UKAEA","DVCM","indica","Ziga","Carine","ITPA","IMAS"],"allowCompoundWords":true,"useGitignore":true} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 4747d72..8a10fbd 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -49,29 +49,23 @@ local config = function() flags = { debounce_text_changes = 150 }, capabilities = require("cmp_nvim_lsp").default_capabilities(), } - local lsp = require("lspconfig") - if vim.fn.executable("pyright") == 1 then lsp["pyright"].setup(lsp_config) end - if vim.fn.executable("pylsp") == 1 then lsp["pylsp"].setup(lsp_config) end - if vim.fn.executable("jedi-language-server") == 1 then lsp["jedi_language_server"].setup(lsp_config) end - if vim.fn.executable("ruff-lsp") == 1 then lsp["ruff_lsp"].setup(lsp_config) end - if vim.fn.executable("lua-language-server") == 1 then lsp["lua_ls"].setup(lsp_config) end - if vim.fn.executable("nil") == 1 then lsp["nil_ls"].setup(lsp_config) end - if vim.fn.executable("fortls") == 1 then lsp["fortls"].setup(lsp_config) end - if vim.fn.executable("yaml-language-server") == 1 then lsp["yamlls"].setup(lsp_config) end - if vim.fn.executable("vim-language-server") == 1 then lsp["vimls"].setup(lsp_config) end - if vim.fn.executable("bash-language-server") == 1 then lsp["bashls"].setup(lsp_config) end + local lsp = require "lspconfig" + if vim.fn.executable "pyright" == 1 then + lsp["pyright"].setup(lsp_config) + elseif vim.fn.executable "pyslp" == 1 then + lsp["pylsp"].setup(lsp_config) + end + if vim.fn.executable "ruff-lsp" == 1 then lsp["ruff_lsp"].setup(lsp_config) end + if vim.fn.executable "lua-language-server" == 1 then lsp["lua_ls"].setup(lsp_config) end + if vim.fn.executable "nil" == 1 then lsp["nil_ls"].setup(lsp_config) end + if vim.fn.executable "fortls" == 1 then lsp["fortls"].setup(lsp_config) end + if vim.fn.executable "yaml-language-server" == 1 then lsp["yamlls"].setup(lsp_config) end + if vim.fn.executable "vim-language-server" == 1 then lsp["vimls"].setup(lsp_config) end + if vim.fn.executable "bash-language-server" == 1 then lsp["bashls"].setup(lsp_config) end local builtins = require "null-ls.builtins" - local cspell = require "cspell" - local cspell_config = { - filetypes = { "json", "yaml", "html", "markdown", "norg", "gitcommit" }, - config={ config_file_preferred_name = ".cspell.json" } - } require("null-ls").setup { sources = { - cspell.diagnostics.with (cspell_config), - cspell.code_actions.with (cspell_config), - builtins.code_actions.gitsigns, builtins.formatting.alejandra, builtins.formatting.beautysh, @@ -93,11 +87,6 @@ return { "neovim/nvim-lspconfig", cond = not vim.g.vscode, event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "cmp-nvim-lsp", - "folke/trouble.nvim", - "folke/neodev.nvim", - { "jose-elias-alvarez/null-ls.nvim", dependencies = "davidmh/cspell.nvim" }, - }, + dependencies = { "cmp-nvim-lsp", "folke/trouble.nvim", "folke/neodev.nvim", "jose-elias-alvarez/null-ls.nvim" }, config = config, }