blob: aba9d68d7f827f3a4f3406dece2d31cf243220b4 [file] [log] [blame]
Skyler Greyc96cd8a2022-06-15 12:28:27 +01001{ pkgs, ... }: {
Skyler Greye6995322022-06-12 09:29:17 +01002 programs.neovim = {
3 enable = true;
Skyler Greyc96cd8a2022-06-15 12:28:27 +01004 coc = {
5 enable = true;
6 settings = {
7 "suggest.noselect" = false;
8 };
9 };
Skyler Greye6995322022-06-12 09:29:17 +010010 viAlias = true;
11 vimAlias = true;
12 vimdiffAlias = true;
Skyler Greyc96cd8a2022-06-15 12:28:27 +010013 extraConfig = ''
14 set whichwrap=b,s,<,>,[,]
Skyler Greya3999c02022-06-24 14:05:13 +010015 set linebreak
Skyler Grey2e80a192022-06-15 14:23:01 +010016 set wrap
17 set number
Skyler Greya949ffd2022-06-23 23:32:48 +010018 set cursorline
Skyler Grey32da1932022-07-05 08:37:59 +010019 set expandtab
Skyler Greya949ffd2022-06-23 23:32:48 +010020 colorscheme onehalfdark
21
22 if exists('+termguicolors')
23 let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
24 let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
25 set termguicolors
26 endif
Skyler Grey48028522022-06-23 23:37:22 +010027
Skyler Greyad45e3f2022-07-04 18:07:17 +010028 highlight ExtraWhitespace ctermbg=red guibg=red
29 match ExtraWhitespace /\s\+$/
Skyler Grey9f3a7202022-07-05 08:59:50 +010030 " highlight Tab ctermbg=red guibg=red
31 " match Tab /\t/
Skyler Grey686ca7f2022-06-24 14:30:05 +010032
Skyler Grey48028522022-06-23 23:37:22 +010033 set statusline=%t "tail of the filename
34 set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
35 set statusline+=%{&ff}] "file format
36 set statusline+=%h "help file flag
37 set statusline+=%m "modified flag
38 set statusline+=%r "read only flag
39 set statusline+=%y "filetype
40 set statusline+=%= "left/right separator
41 set statusline+=%c, "cursor column
42 set statusline+=%l/%L "cursor line/total lines
43 set statusline+=\ %P "percent through file
Skyler Grey686ca7f2022-06-24 14:30:05 +010044
45 lua << EOF
46 require('neorg').setup {
47 load = {
48 ["core.defaults"] = {}
49 }
50 }
Skyler Grey55109532022-07-04 18:31:29 +010051
Skyler Greyb3283572022-06-24 21:25:29 +010052 require('orgmode').setup_ts_grammar()
Skyler Grey810c00e2022-06-24 21:16:22 +010053
54 require('nvim-treesitter.configs').setup {
55 highlight = {
56 enable = true,
Skyler Greyb3283572022-06-24 21:25:29 +010057 additional_vim_regex_highlighting = {'org'},
Skyler Grey810c00e2022-06-24 21:16:22 +010058 },
59 indent = {
60 enable = true,
61 },
62 }
Skyler Grey686ca7f2022-06-24 14:30:05 +010063 EOF
Skyler Greyc96cd8a2022-06-15 12:28:27 +010064 '';
Skyler Grey686ca7f2022-06-24 14:30:05 +010065
Skyler Greyc96cd8a2022-06-15 12:28:27 +010066 plugins = [
67 pkgs.vimPlugins.vim-nix
Skyler Greye96d0112022-06-15 15:39:56 +010068 pkgs.vimPlugins.copilot-vim
Skyler Greyf2b5e262022-06-15 15:59:50 +010069 pkgs.vimPlugins.coc-tsserver
Skyler Grey55109532022-07-04 18:31:29 +010070 pkgs.vimPlugins.coc-eslint
Skyler Grey58867232022-06-23 22:02:10 +010071 pkgs.vimPlugins.zoomwintab-vim
72 pkgs.vimPlugins.onehalf
Skyler Grey619d8602022-06-24 14:20:51 +010073 pkgs.vimPlugins.neorg
Skyler Greyb3283572022-06-24 21:25:29 +010074 pkgs.vimPlugins.orgmode
Skyler Grey238934b2022-06-24 15:51:41 +010075 (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: [
76 pkgs.tree-sitter-grammars.tree-sitter-go
77 pkgs.tree-sitter-grammars.tree-sitter-nix
78 pkgs.tree-sitter-grammars.tree-sitter-tsx
79 pkgs.tree-sitter-grammars.tree-sitter-rust
80 pkgs.tree-sitter-grammars.tree-sitter-css
81 pkgs.tree-sitter-grammars.tree-sitter-norg
82 pkgs.tree-sitter-grammars.tree-sitter-json
83 pkgs.tree-sitter-grammars.tree-sitter-glsl
84 pkgs.tree-sitter-grammars.tree-sitter-regex
85 pkgs.tree-sitter-grammars.tree-sitter-latex
86 pkgs.tree-sitter-grammars.tree-sitter-python
87 pkgs.tree-sitter-grammars.tree-sitter-comment
88 pkgs.tree-sitter-grammars.tree-sitter-markdown
89 pkgs.tree-sitter-grammars.tree-sitter-org-nvim
90 pkgs.tree-sitter-grammars.tree-sitter-typescript
91 pkgs.tree-sitter-grammars.tree-sitter-javascript
92 ]))
Skyler Greyc96cd8a2022-06-15 12:28:27 +010093 ];
Skyler Greye6995322022-06-12 09:29:17 +010094 };
Skyler Greyc96cd8a2022-06-15 12:28:27 +010095
96 home.sessionVariables.EDITOR = "${pkgs.neovim}/bin/nvim";
Skyler Grey73c55fc2022-06-12 09:18:59 +010097}