Skyler Grey | c96cd8a | 2022-06-15 12:28:27 +0100 | [diff] [blame] | 1 | { pkgs, ... }: { |
Skyler Grey | e699532 | 2022-06-12 09:29:17 +0100 | [diff] [blame] | 2 | programs.neovim = { |
| 3 | enable = true; |
Skyler Grey | c96cd8a | 2022-06-15 12:28:27 +0100 | [diff] [blame] | 4 | coc = { |
| 5 | enable = true; |
| 6 | settings = { |
| 7 | "suggest.noselect" = false; |
| 8 | }; |
| 9 | }; |
Skyler Grey | e699532 | 2022-06-12 09:29:17 +0100 | [diff] [blame] | 10 | viAlias = true; |
| 11 | vimAlias = true; |
| 12 | vimdiffAlias = true; |
Skyler Grey | c96cd8a | 2022-06-15 12:28:27 +0100 | [diff] [blame] | 13 | extraConfig = '' |
| 14 | set whichwrap=b,s,<,>,[,] |
Skyler Grey | a3999c0 | 2022-06-24 14:05:13 +0100 | [diff] [blame] | 15 | set linebreak |
Skyler Grey | 2e80a19 | 2022-06-15 14:23:01 +0100 | [diff] [blame] | 16 | set wrap |
| 17 | set number |
Skyler Grey | a949ffd | 2022-06-23 23:32:48 +0100 | [diff] [blame] | 18 | set cursorline |
| 19 | colorscheme onehalfdark |
| 20 | |
| 21 | if exists('+termguicolors') |
| 22 | let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" |
| 23 | let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" |
| 24 | set termguicolors |
| 25 | endif |
Skyler Grey | 4802852 | 2022-06-23 23:37:22 +0100 | [diff] [blame] | 26 | |
Skyler Grey | ad45e3f | 2022-07-04 18:07:17 +0100 | [diff] [blame] | 27 | highlight ExtraWhitespace ctermbg=red guibg=red |
| 28 | match ExtraWhitespace /\s\+$/ |
Skyler Grey | 686ca7f | 2022-06-24 14:30:05 +0100 | [diff] [blame] | 29 | |
Skyler Grey | 4802852 | 2022-06-23 23:37:22 +0100 | [diff] [blame] | 30 | set statusline=%t "tail of the filename |
| 31 | set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding |
| 32 | set statusline+=%{&ff}] "file format |
| 33 | set statusline+=%h "help file flag |
| 34 | set statusline+=%m "modified flag |
| 35 | set statusline+=%r "read only flag |
| 36 | set statusline+=%y "filetype |
| 37 | set statusline+=%= "left/right separator |
| 38 | set statusline+=%c, "cursor column |
| 39 | set statusline+=%l/%L "cursor line/total lines |
| 40 | set statusline+=\ %P "percent through file |
Skyler Grey | 686ca7f | 2022-06-24 14:30:05 +0100 | [diff] [blame] | 41 | |
| 42 | lua << EOF |
| 43 | require('neorg').setup { |
| 44 | load = { |
| 45 | ["core.defaults"] = {} |
| 46 | } |
| 47 | } |
Skyler Grey | 5510953 | 2022-07-04 18:31:29 +0100 | [diff] [blame^] | 48 | |
Skyler Grey | b328357 | 2022-06-24 21:25:29 +0100 | [diff] [blame] | 49 | require('orgmode').setup_ts_grammar() |
Skyler Grey | 810c00e | 2022-06-24 21:16:22 +0100 | [diff] [blame] | 50 | |
| 51 | require('nvim-treesitter.configs').setup { |
| 52 | highlight = { |
| 53 | enable = true, |
Skyler Grey | b328357 | 2022-06-24 21:25:29 +0100 | [diff] [blame] | 54 | additional_vim_regex_highlighting = {'org'}, |
Skyler Grey | 810c00e | 2022-06-24 21:16:22 +0100 | [diff] [blame] | 55 | }, |
| 56 | indent = { |
| 57 | enable = true, |
| 58 | }, |
| 59 | } |
Skyler Grey | 686ca7f | 2022-06-24 14:30:05 +0100 | [diff] [blame] | 60 | EOF |
Skyler Grey | c96cd8a | 2022-06-15 12:28:27 +0100 | [diff] [blame] | 61 | ''; |
Skyler Grey | 686ca7f | 2022-06-24 14:30:05 +0100 | [diff] [blame] | 62 | |
Skyler Grey | c96cd8a | 2022-06-15 12:28:27 +0100 | [diff] [blame] | 63 | plugins = [ |
| 64 | pkgs.vimPlugins.vim-nix |
Skyler Grey | e96d011 | 2022-06-15 15:39:56 +0100 | [diff] [blame] | 65 | pkgs.vimPlugins.copilot-vim |
Skyler Grey | f2b5e26 | 2022-06-15 15:59:50 +0100 | [diff] [blame] | 66 | pkgs.vimPlugins.coc-tsserver |
Skyler Grey | 5510953 | 2022-07-04 18:31:29 +0100 | [diff] [blame^] | 67 | pkgs.vimPlugins.coc-eslint |
Skyler Grey | 5886723 | 2022-06-23 22:02:10 +0100 | [diff] [blame] | 68 | pkgs.vimPlugins.zoomwintab-vim |
| 69 | pkgs.vimPlugins.onehalf |
Skyler Grey | 619d860 | 2022-06-24 14:20:51 +0100 | [diff] [blame] | 70 | pkgs.vimPlugins.neorg |
Skyler Grey | b328357 | 2022-06-24 21:25:29 +0100 | [diff] [blame] | 71 | pkgs.vimPlugins.orgmode |
Skyler Grey | 238934b | 2022-06-24 15:51:41 +0100 | [diff] [blame] | 72 | (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: [ |
| 73 | pkgs.tree-sitter-grammars.tree-sitter-go |
| 74 | pkgs.tree-sitter-grammars.tree-sitter-nix |
| 75 | pkgs.tree-sitter-grammars.tree-sitter-tsx |
| 76 | pkgs.tree-sitter-grammars.tree-sitter-rust |
| 77 | pkgs.tree-sitter-grammars.tree-sitter-css |
| 78 | pkgs.tree-sitter-grammars.tree-sitter-norg |
| 79 | pkgs.tree-sitter-grammars.tree-sitter-json |
| 80 | pkgs.tree-sitter-grammars.tree-sitter-glsl |
| 81 | pkgs.tree-sitter-grammars.tree-sitter-regex |
| 82 | pkgs.tree-sitter-grammars.tree-sitter-latex |
| 83 | pkgs.tree-sitter-grammars.tree-sitter-python |
| 84 | pkgs.tree-sitter-grammars.tree-sitter-comment |
| 85 | pkgs.tree-sitter-grammars.tree-sitter-markdown |
| 86 | pkgs.tree-sitter-grammars.tree-sitter-org-nvim |
| 87 | pkgs.tree-sitter-grammars.tree-sitter-typescript |
| 88 | pkgs.tree-sitter-grammars.tree-sitter-javascript |
| 89 | ])) |
Skyler Grey | c96cd8a | 2022-06-15 12:28:27 +0100 | [diff] [blame] | 90 | ]; |
Skyler Grey | e699532 | 2022-06-12 09:29:17 +0100 | [diff] [blame] | 91 | }; |
Skyler Grey | c96cd8a | 2022-06-15 12:28:27 +0100 | [diff] [blame] | 92 | |
| 93 | home.sessionVariables.EDITOR = "${pkgs.neovim}/bin/nvim"; |
Skyler Grey | 73c55fc | 2022-06-12 09:18:59 +0100 | [diff] [blame] | 94 | } |