aboutsummaryrefslogtreecommitdiffstats
path: root/hm/nixvim
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-04-04 17:06:23 +0200
committerSilas Schöffel <sils@sils.li>2024-04-04 17:06:23 +0200
commit924ec30e7075ea7a9dbac569a537d876f9146850 (patch)
tree11ff56048f05536a1905490137333b3596d0ee18 /hm/nixvim
parentusers/default.nix: delete (diff)
downloadnix-config-924ec30e7075ea7a9dbac569a537d876f9146850.zip
refactor: move users/sils dir to hm
Diffstat (limited to 'hm/nixvim')
-rw-r--r--hm/nixvim/config.nix138
-rw-r--r--hm/nixvim/default.nix7
2 files changed, 145 insertions, 0 deletions
diff --git a/hm/nixvim/config.nix b/hm/nixvim/config.nix
new file mode 100644
index 0000000..5ce397c
--- /dev/null
+++ b/hm/nixvim/config.nix
@@ -0,0 +1,138 @@
+pkgs: {
+ opts = {
+ number = true;
+ relativenumber = true;
+ shiftwidth = 2;
+ tabstop = 2;
+ scrolloff = 999;
+
+ textwidth = 83;
+ linebreak = true;
+ };
+ keymaps = [
+ {
+ mode = ["n" "i" "t"];
+ key = "<A-h>";
+ action = ''<C-\><C-N><C-w>h'';
+ }
+ {
+ mode = ["n" "i" "t"];
+ key = "<A-j>";
+ action = ''<C-\><C-N><C-w>j'';
+ }
+ {
+ mode = ["n" "i" "t"];
+ key = "<A-k>";
+ action = ''<C-\><C-N><C-w>k'';
+ }
+ {
+ mode = ["n" "i" "t"];
+ key = "<A-l>";
+ action = ''<C-\><C-N><C-w>l'';
+ }
+ {
+ key = "<A-t>";
+ action = ":Neotree float reveal_force_cwd<cr>";
+ }
+ {
+ key = "<A-b>";
+ action = ":Neotree float buffers<cr>";
+ }
+ {
+ key = "<A-s>";
+ action = ":Neotree float git_status<cr>";
+ }
+ ];
+ extraPlugins = with pkgs.vimPlugins; [
+ vim-airline-themes
+ ];
+ plugins = {
+ airline = {
+ enable = true;
+ settings = {
+ powerline_fonts = true;
+ };
+ };
+ cmp = {
+ enable = true;
+ settings = {
+ mappings = {
+ "<C-Space>" = "cmp.mapping.complete()";
+ "<C-d>" = "cmp.mapping.scroll_docs(-4)";
+ "<C-e>" = "cmp.mapping.close()";
+ "<C-f>" = "cmp.mapping.scroll_docs(4)";
+ "<CR>" = "cmp.mapping.confirm({ select = true })";
+ "<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
+ "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
+ };
+ sources = [
+ {name = "nvim_lsp";}
+ {name = "path";}
+ {name = "buffer";}
+ {name = "git";}
+ {name = "conventionalcommits";}
+ ];
+ };
+ };
+ coq-nvim = {
+ enable = false;
+ settings = {
+ auto_start = "shut-up";
+ };
+ installArtifacts = true;
+ };
+ dashboard = {
+ enable = true;
+ };
+ lsp = {
+ enable = true;
+ servers = {
+ nil_ls.enable = true;
+ rust-analyzer = {
+ enable = true;
+ installCargo = true;
+ installRustc = true;
+ };
+ ltex.enable = true;
+ java-language-server.enable = true;
+ };
+ };
+ lsp-format = {
+ enable = true;
+ };
+ quickmath.enable = true;
+ treesitter = {
+ enable = true;
+ indent = true;
+ };
+ treesitter-context = {
+ enable = true;
+ };
+ treesitter-refactor = {
+ enable = true;
+ };
+ mini = {
+ enable = true;
+ };
+ markdown-preview = {
+ enable = true;
+ };
+ nix = {
+ enable = true;
+ };
+ neo-tree = {
+ enable = true;
+ autoCleanAfterSessionRestore = true;
+ closeIfLastWindow = true;
+ };
+ nvim-autopairs = {
+ enable = true;
+ };
+ vim-css-color = {
+ enable = true;
+ };
+ vimtex = {
+ enable = true;
+ };
+ };
+}
diff --git a/hm/nixvim/default.nix b/hm/nixvim/default.nix
new file mode 100644
index 0000000..a4a96ef
--- /dev/null
+++ b/hm/nixvim/default.nix
@@ -0,0 +1,7 @@
+{pkgs, ...}: {
+ programs.nixvim =
+ {
+ enable = true;
+ }
+ // import ./config.nix pkgs;
+}