Compare commits

...

2 commits

Author SHA1 Message Date
matt1432 0667f0f4c9 fix(nvim): keep bash settings even when not using as IDE
All checks were successful
Discord / discord commits (push) Has been skipped
2024-05-09 09:13:40 -04:00
matt1432 9c9945523c feat(nvim): setup lsp_lines 2024-05-09 09:12:01 -04:00
4 changed files with 49 additions and 40 deletions

View file

@ -6,33 +6,33 @@
}: let
inherit (config.vars) neovimIde;
inherit (pkgs) vimPlugins;
in
lib.mkIf neovimIde {
programs = {
# I love doing typos
bash.shellAliases = {
nivm = "nvim";
nivim = "nvim";
};
neovim = {
defaultEditor = true;
viAlias = true;
vimAlias = true;
extraLuaConfig =
/*
lua
*/
''
vim.api.nvim_create_autocmd("FileType", {
pattern = 'sh',
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
});
'';
plugins = [
];
};
in {
programs = {
# I love doing typos
bash.shellAliases = {
nivm = "nvim";
nivim = "nvim";
};
}
neovim = {
defaultEditor = true;
viAlias = true;
vimAlias = true;
extraLuaConfig =
/*
lua
*/
''
vim.api.nvim_create_autocmd("FileType", {
pattern = 'sh',
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
});
'';
plugins =
lib.mkIf neovimIde [
];
};
};
}

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