From 924ec30e7075ea7a9dbac569a537d876f9146850 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Thu, 4 Apr 2024 17:06:23 +0200 Subject: refactor: move users/sils dir to hm --- hm/nixvim/config.nix | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 hm/nixvim/config.nix (limited to 'hm/nixvim/config.nix') 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 = ""; + action = ''h''; + } + { + mode = ["n" "i" "t"]; + key = ""; + action = ''j''; + } + { + mode = ["n" "i" "t"]; + key = ""; + action = ''k''; + } + { + mode = ["n" "i" "t"]; + key = ""; + action = ''l''; + } + { + key = ""; + action = ":Neotree float reveal_force_cwd"; + } + { + key = ""; + action = ":Neotree float buffers"; + } + { + key = ""; + action = ":Neotree float git_status"; + } + ]; + extraPlugins = with pkgs.vimPlugins; [ + vim-airline-themes + ]; + plugins = { + airline = { + enable = true; + settings = { + powerline_fonts = true; + }; + }; + cmp = { + enable = true; + settings = { + mappings = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "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; + }; + }; +} -- cgit 1.4.1