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", {
|
cmp.setup.filetype("gitcommit", {
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "nvim_lsp" },
|
{ 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 })
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
end
|
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()
|
require("neodev").setup()
|
||||||
|
|
||||||
M.on_attach = require "lsp.attach"
|
M.on_attach = require "lsp.attach"
|
||||||
M.lsp_flags = require "lsp.flags"
|
M.lsp_flags = require "lsp.flags"
|
||||||
M.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
M.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
require("mason-lspconfig").setup_handlers {
|
local servers = { "jedi_language_server", "lua_ls", "rnix", "nil_ls", "fortls" }
|
||||||
function(server_name)
|
for _, name in ipairs(servers) do
|
||||||
require("lspconfig")[server_name].setup {
|
require("lspconfig")[name].setup {
|
||||||
on_attach = M.on_attach,
|
on_attach = M.on_attach,
|
||||||
flags = M.lsp_flags,
|
flags = M.lsp_flags,
|
||||||
capabilities = M.capabilities,
|
capabilities = M.capabilities,
|
||||||
}
|
}
|
||||||
end,
|
end
|
||||||
}
|
|
||||||
require("null-ls").setup {
|
require("null-ls").setup {
|
||||||
sources = require "lsp.null_ls_sources",
|
sources = require "lsp.null_ls_sources",
|
||||||
on_attach = M.on_attach,
|
on_attach = M.on_attach,
|
||||||
flags = M.lsp_flags,
|
flags = M.lsp_flags,
|
||||||
capabilities = M.capabilities,
|
capabilities = M.capabilities,
|
||||||
}
|
}
|
||||||
require("mason-null-ls").setup_handlers()
|
|
||||||
require("mason-nvim-dap").setup_handlers()
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -3,6 +3,7 @@ return {
|
||||||
null_ls.builtins.code_actions.gitsigns,
|
null_ls.builtins.code_actions.gitsigns,
|
||||||
null_ls.builtins.diagnostics.zsh,
|
null_ls.builtins.diagnostics.zsh,
|
||||||
null_ls.builtins.diagnostics.mypy,
|
null_ls.builtins.diagnostics.mypy,
|
||||||
|
null_ls.builtins.diagnostics.ruff,
|
||||||
null_ls.builtins.formatting.black,
|
null_ls.builtins.formatting.black,
|
||||||
null_ls.builtins.formatting.isort,
|
null_ls.builtins.formatting.isort,
|
||||||
null_ls.builtins.formatting.trim_whitespace,
|
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;
|
shadow = true;
|
||||||
fade = true;
|
fade = true;
|
||||||
activeOpacity = 1.0;
|
activeOpacity = 1.0;
|
||||||
inactiveOpacity = 0.8;
|
inactiveOpacity = 1.0;
|
||||||
settings = {
|
|
||||||
blur =
|
|
||||||
{
|
|
||||||
method = "dual_kawase";
|
|
||||||
size = 10;
|
|
||||||
deviation = 5.0;
|
|
||||||
strength = 7;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,7 @@
|
||||||
programs.neovim.defaultEditor = true;
|
programs.neovim.defaultEditor = true;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||||
|
file
|
||||||
|
silver-searcher
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,21 +3,35 @@
|
||||||
{
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
vimdiffAlias = true;
|
vimdiffAlias = true;
|
||||||
withNodeJs = true;
|
withNodeJs = true;
|
||||||
|
withRuby = true;
|
||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
};
|
extraPackages = with pkgs; [
|
||||||
home.packages = with pkgs; [
|
# Used by installed plugins
|
||||||
gnumake
|
gnumake
|
||||||
gcc
|
gcc
|
||||||
python310Packages.mypy
|
|
||||||
python310Packages.black
|
|
||||||
python310Packages.isort
|
|
||||||
fzf
|
fzf
|
||||||
ripgrep
|
ripgrep
|
||||||
cargo
|
# LSP config
|
||||||
rustc
|
# 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