feat(nvim): setup lsp_lines

This commit is contained in:
matt1432 2024-05-09 09:12:01 -04:00
parent 8ccc90c9f3
commit 9c9945523c
3 changed files with 20 additions and 11 deletions

View file

@ -50,13 +50,23 @@ in {
lsp_status.on_attach(client);
end,
});
-- Disable virtual_text since it's redundant due to lsp_lines.
vim.diagnostic.config({
virtual_text = false,
});
require('lsp_lines').setup();
'';
plugins = [
vimPlugins.nvim-lspconfig
vimPlugins.coq_nvim
vimPlugins.coq-artifacts
vimPlugins.coq-thirdparty
vimPlugins.lsp-status-nvim
vimPlugins.lsp_lines-nvim
];
};
};

View file

@ -55,7 +55,7 @@ in
lua
*/
''
local lsp = require('lspconfig')
local lsp = require('lspconfig');
lsp.nixd.setup({});
lsp.nixd.setup(require('coq').lsp_ensure_capabilities({}));

View file

@ -1,6 +1,6 @@
-- Override netrw
vim.g.loaded_netrw = 0
vim.g.loaded_netrwPlugin = 0
vim.g.loaded_netrw = 0;
vim.g.loaded_netrwPlugin = 0;
require('neo-tree').setup({
close_if_last_window = true,
@ -28,21 +28,20 @@ require('neo-tree').setup({
source_selector = {
winbar = true,
statusline = false
statusline = false,
},
follow_current_file = {
enabled = true,
leave_dirs_open = true,
}
})
},
});
local function is_neotree_open()
local manager = require("neo-tree.sources.manager")
local renderer = require("neo-tree.ui.renderer")
local state = manager.get_state("filesystem")
local window_exists = renderer.window_exists(state)
return window_exists
local manager = require("neo-tree.sources.manager");
local renderer = require("neo-tree.ui.renderer");
local state = manager.get_state("filesystem");
return renderer.window_exists(state);
end
-- Auto open Neo-Tree on big enough window