mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-08 22:05:06 +02:00
fix: astronvim - install lsp, fomatters and others via home-manager instead of mason.nvim
This commit is contained in:
@@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
My Neovim config based on AstroNvim.
|
My Neovim config based on AstroNvim.
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
- [ ] Install language servers, formatters, and others via nix home manager, instead of mason.nvim!
|
|
||||||
- currently some plugins(markdown/clangd/...) failed to start due to this problem.
|
|
||||||
- Temporary solution: `rm ~/.local/share/nvim/mason/bin/*`, but do not remove `emmet-ls`, cause it's not found in nixpkgs!
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -5,7 +5,9 @@ return {
|
|||||||
opt = {
|
opt = {
|
||||||
relativenumber = true, -- Show relative numberline
|
relativenumber = true, -- Show relative numberline
|
||||||
signcolumn = "auto", -- Show sign column when used only
|
signcolumn = "auto", -- Show sign column when used only
|
||||||
spell = false, -- Enable spell checking
|
spell = false, -- Spell checking
|
||||||
|
swapfile = false, -- Swapfile
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -79,6 +81,39 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Install lsp, formmatter and others via home manager instead of Mason.nvim
|
||||||
|
-- LSP installations
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
-- ensure_installed nothing
|
||||||
|
opts = function(_, opts) opts.ensure_installed = {
|
||||||
|
"emmet_ls", -- not exist in nixpkgs, so install it via mason
|
||||||
|
} end,
|
||||||
|
},
|
||||||
|
-- Formatters/Linter installation
|
||||||
|
{
|
||||||
|
"jay-babu/mason-null-ls.nvim",
|
||||||
|
-- ensure_installed nothing
|
||||||
|
opts = function(_, opts) opts.ensure_installed = {} end,
|
||||||
|
},
|
||||||
|
-- Debugger installationl
|
||||||
|
{
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
-- overrides `require("mason-nvim-dap").setup(...)`
|
||||||
|
opts = function(_, opts) opts.ensure_installed = {} end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Configure require("lazy").setup() options
|
||||||
|
lazy = {
|
||||||
|
defaults = { lazy = true },
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- customize default disabled vim plugins
|
||||||
|
disabled_plugins = { };
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
lsp = {
|
lsp = {
|
||||||
@@ -91,6 +126,7 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- enable servers that installed by home-manager instead of mason
|
||||||
servers = {
|
servers = {
|
||||||
"dockerls",
|
"dockerls",
|
||||||
"jsonnet_ls", -- jsonnet language server
|
"jsonnet_ls", -- jsonnet language server
|
||||||
|
|||||||
Reference in New Issue
Block a user