Move neovim config and prepare orgmode

This commit is contained in:
Valentin Brandl 2022-04-14 10:29:33 +02:00
parent b6fb146634
commit 2de4d8c2ff
3 changed files with 28 additions and 2 deletions

View File

@ -20,7 +20,7 @@ user:
./i3.nix ./i3.nix
./lsd.nix ./lsd.nix
./man.nix ./man.nix
./neovim.nix ./neovim/neovim.nix
./nextcloud.nix ./nextcloud.nix
./pasystray.nix ./pasystray.nix
./photography.nix ./photography.nix

20
home/neovim/init.lua Normal file
View File

@ -0,0 +1,20 @@
-- init.lua
-- Load custom tree-sitter grammar for org filetype
require('orgmode').setup_ts_grammar()
-- Tree-sitter configuration
require'nvim-treesitter.configs'.setup {
-- If TS highlights are not enabled at all, or disabled via `disable` prop, highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
disable = {'org'}, -- Remove this to use TS highlighter for some of the highlights (Experimental)
additional_vim_regex_highlighting = {'org'}, -- Required since TS highlighter doesn't support all syntax features (conceal)
},
ensure_installed = {'org'}, -- Or run :TSUpdate org
}
require('orgmode').setup({
org_agenda_files = {'~/Nextcloud/org/*'},
org_default_notes_file = '~/Nextcloud/org/refile.org',
})

View File

@ -9,6 +9,9 @@ let
coc-pyright coc-pyright
coc-go coc-go
# orgmode-nvim
# nvim-treesitter
ctrlp-vim ctrlp-vim
editorconfig-vim editorconfig-vim
vim-gist vim-gist
@ -426,6 +429,9 @@ let
" let g:tex_flavor = 'latex' " let g:tex_flavor = 'latex'
''; '';
# lua << EOF
# ${builtins.readFile ./init.lua}
# EOF
}; };
in { in {
# Note that this doesnt merge deeply, so you couldnt add to plugins. For that # Note that this doesnt merge deeply, so you couldnt add to plugins. For that
@ -443,7 +449,7 @@ in {
}; };
}; };
} // config; } // config;
programs.vim = config; # programs.vim = config;
# xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON { # xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON {
# # "go.goplsPath" = "${gopls}/bin/gopls"; # # "go.goplsPath" = "${gopls}/bin/gopls";