updates to nvim config, helix initial setup

This commit is contained in:
Haak Saxberg 2023-11-03 11:07:59 -07:00
parent 8600e668c5
commit 396fcf26ac
5 changed files with 63 additions and 3 deletions

View file

@ -0,0 +1,47 @@
{ pkgs, ... }:
{
programs.helix = {
enable = true;
languages = {
language-server.rnix-lsp = {
command = "${pkgs.rnix-lsp}/bin/rnix-lsp";
};
language = [
{
name = "nix";
auto-format = true;
language-servers = [
{ name = "rnix-lsp"; }
];
}
];
};
settings = {
theme = "catppuccin_mocha";
editor = {
line-number = "relative";
lsp.display-messages = true;
cursor-shape = {
insert = "underline";
normal = "block";
select = "block";
};
};
keys = {
normal = {
g = { a = "code_action"; }; # Maps `ga` to show possible code actions
"ret" = [ "move_line_down" "goto_first_nonwhitespace" ]; # Maps the enter key to move to start of next line
X = "extend_line_above";
D = "delete_char_backward";
";" = "command_mode";
"S-ret" = [ "move_line_up" "goto_first_nonwhitespace" ];
};
insert = {
j = { j = "normal_mode"; }; # Maps `jk` to exit insert mode
};
};
};
};
}

View file

@ -103,6 +103,10 @@ with builtins;
plugin = neogit;
config = ''
noremap <leader>g :Neogit<CR>
lua << EOF
local neogit = require('neogit')
neogit.setup {}
EOF
'';
}
vinegar