Remove nvim-mason, using nix to manager LSP installs instead
This commit is contained in:
parent
b83d57f8fa
commit
49643683d4
|
@ -1,13 +0,0 @@
|
|||
return {
|
||||
pip = {
|
||||
upgrade_pip = true,
|
||||
},
|
||||
ui = {
|
||||
border = "single",
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
automatic_installation = false,
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
automatic_installation = false,
|
||||
automatic_setup = true,
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
automatic_installation = false,
|
||||
automatic_setup = true,
|
||||
}
|
|
@ -50,6 +50,12 @@ cmp.setup.filetype("python", {
|
|||
},
|
||||
})
|
||||
|
||||
cmp.setup.filetype("nix", {
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
|
|
|
@ -14,32 +14,26 @@ for type, icon in pairs(signs) do
|
|||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup(require "config.mason_lspconfig")
|
||||
require("mason-null-ls").setup(require "config.mason_null_ls")
|
||||
require("mason-nvim-dap").setup()
|
||||
require("neodev").setup()
|
||||
|
||||
M.on_attach = require "lsp.attach"
|
||||
M.lsp_flags = require "lsp.flags"
|
||||
M.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
require("mason-lspconfig").setup_handlers {
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup {
|
||||
local servers = { "jedi_language_server", "lua_ls", "rnix", "nil_ls", "fortls" }
|
||||
for _, name in ipairs(servers) do
|
||||
require("lspconfig")[name].setup {
|
||||
on_attach = M.on_attach,
|
||||
flags = M.lsp_flags,
|
||||
capabilities = M.capabilities,
|
||||
}
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
require("null-ls").setup {
|
||||
sources = require "lsp.null_ls_sources",
|
||||
on_attach = M.on_attach,
|
||||
flags = M.lsp_flags,
|
||||
capabilities = M.capabilities,
|
||||
}
|
||||
require("mason-null-ls").setup_handlers()
|
||||
require("mason-nvim-dap").setup_handlers()
|
||||
|
||||
return M
|
||||
|
|
|
@ -3,6 +3,7 @@ return {
|
|||
null_ls.builtins.code_actions.gitsigns,
|
||||
null_ls.builtins.diagnostics.zsh,
|
||||
null_ls.builtins.diagnostics.mypy,
|
||||
null_ls.builtins.diagnostics.ruff,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.trim_whitespace,
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
cmd = {
|
||||
"Mason",
|
||||
},
|
||||
config = function() require("mason").setup(require "config.mason") end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
lazy = true,
|
||||
},
|
||||
}
|
|
@ -8,15 +8,6 @@
|
|||
shadow = true;
|
||||
fade = true;
|
||||
activeOpacity = 1.0;
|
||||
inactiveOpacity = 0.8;
|
||||
settings = {
|
||||
blur =
|
||||
{
|
||||
method = "dual_kawase";
|
||||
size = 10;
|
||||
deviation = 5.0;
|
||||
strength = 7;
|
||||
};
|
||||
};
|
||||
inactiveOpacity = 1.0;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,5 +8,7 @@
|
|||
programs.neovim.defaultEditor = true;
|
||||
home.packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
file
|
||||
silver-searcher
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,21 +3,35 @@
|
|||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withRuby = true;
|
||||
withPython3 = true;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
extraPackages = with pkgs; [
|
||||
# Used by installed plugins
|
||||
gnumake
|
||||
gcc
|
||||
python310Packages.mypy
|
||||
python310Packages.black
|
||||
python310Packages.isort
|
||||
fzf
|
||||
ripgrep
|
||||
cargo
|
||||
rustc
|
||||
# LSP config
|
||||
# Python
|
||||
mypy
|
||||
black
|
||||
isort
|
||||
ruff
|
||||
# Nix
|
||||
rnix-lsp
|
||||
nil
|
||||
# Lua
|
||||
sumneko-lua-language-server
|
||||
# Fortran
|
||||
fortran-language-server
|
||||
];
|
||||
extraPython3Packages = ps: with ps; [
|
||||
jedi
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue