blob: d963ea1c2e769a9923c723040a5501ea62cf2b9f [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
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 Grey48028522022-06-23 23:37:22 +010026
Skyler Grey686ca7f2022-06-24 14:30:05 +010027
Skyler Grey48028522022-06-23 23:37:22 +010028 set statusline=%t "tail of the filename
29 set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
30 set statusline+=%{&ff}] "file format
31 set statusline+=%h "help file flag
32 set statusline+=%m "modified flag
33 set statusline+=%r "read only flag
34 set statusline+=%y "filetype
35 set statusline+=%= "left/right separator
36 set statusline+=%c, "cursor column
37 set statusline+=%l/%L "cursor line/total lines
38 set statusline+=\ %P "percent through file
Skyler Grey686ca7f2022-06-24 14:30:05 +010039
40 lua << EOF
41 require('neorg').setup {
42 load = {
43 ["core.defaults"] = {}
44 }
45 }
Skyler Greyb3283572022-06-24 21:25:29 +010046
47 require('orgmode').setup_ts_grammar()
Skyler Grey810c00e2022-06-24 21:16:22 +010048
49 require('nvim-treesitter.configs').setup {
50 highlight = {
51 enable = true,
Skyler Greyb3283572022-06-24 21:25:29 +010052 additional_vim_regex_highlighting = {'org'},
Skyler Grey810c00e2022-06-24 21:16:22 +010053 },
54 indent = {
55 enable = true,
56 },
57 }
Skyler Grey686ca7f2022-06-24 14:30:05 +010058 EOF
Skyler Greyc96cd8a2022-06-15 12:28:27 +010059 '';
Skyler Grey686ca7f2022-06-24 14:30:05 +010060
Skyler Greyc96cd8a2022-06-15 12:28:27 +010061 plugins = [
62 pkgs.vimPlugins.vim-nix
Skyler Greye96d0112022-06-15 15:39:56 +010063 pkgs.vimPlugins.copilot-vim
Skyler Greyf2b5e262022-06-15 15:59:50 +010064 pkgs.vimPlugins.coc-tsserver
Skyler Grey58867232022-06-23 22:02:10 +010065 pkgs.vimPlugins.zoomwintab-vim
66 pkgs.vimPlugins.onehalf
Skyler Grey619d8602022-06-24 14:20:51 +010067 pkgs.vimPlugins.neorg
Skyler Greyb3283572022-06-24 21:25:29 +010068 pkgs.vimPlugins.orgmode
Skyler Grey238934b2022-06-24 15:51:41 +010069 (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: [
70 pkgs.tree-sitter-grammars.tree-sitter-go
71 pkgs.tree-sitter-grammars.tree-sitter-nix
72 pkgs.tree-sitter-grammars.tree-sitter-tsx
73 pkgs.tree-sitter-grammars.tree-sitter-rust
74 pkgs.tree-sitter-grammars.tree-sitter-css
75 pkgs.tree-sitter-grammars.tree-sitter-norg
76 pkgs.tree-sitter-grammars.tree-sitter-json
77 pkgs.tree-sitter-grammars.tree-sitter-glsl
78 pkgs.tree-sitter-grammars.tree-sitter-regex
79 pkgs.tree-sitter-grammars.tree-sitter-latex
80 pkgs.tree-sitter-grammars.tree-sitter-python
81 pkgs.tree-sitter-grammars.tree-sitter-comment
82 pkgs.tree-sitter-grammars.tree-sitter-markdown
83 pkgs.tree-sitter-grammars.tree-sitter-org-nvim
84 pkgs.tree-sitter-grammars.tree-sitter-typescript
85 pkgs.tree-sitter-grammars.tree-sitter-javascript
86 ]))
Skyler Greyc96cd8a2022-06-15 12:28:27 +010087 ];
Skyler Greye6995322022-06-12 09:29:17 +010088 };
Skyler Greyc96cd8a2022-06-15 12:28:27 +010089
90 home.sessionVariables.EDITOR = "${pkgs.neovim}/bin/nvim";
Skyler Grey73c55fc2022-06-12 09:18:59 +010091}