diff --git a/home/default.nix b/home/default.nix index 0281f2f..0358b34 100644 --- a/home/default.nix +++ b/home/default.nix @@ -20,7 +20,7 @@ user: ./i3.nix ./lsd.nix ./man.nix - ./neovim.nix + ./neovim/neovim.nix ./nextcloud.nix ./pasystray.nix ./photography.nix diff --git a/home/neovim/init.lua b/home/neovim/init.lua new file mode 100644 index 0000000..16bb610 --- /dev/null +++ b/home/neovim/init.lua @@ -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', +}) diff --git a/home/neovim.nix b/home/neovim/neovim.nix similarity index 98% rename from home/neovim.nix rename to home/neovim/neovim.nix index 06dd651..fea0c4e 100644 --- a/home/neovim.nix +++ b/home/neovim/neovim.nix @@ -9,6 +9,9 @@ let coc-pyright coc-go + # orgmode-nvim + # nvim-treesitter + ctrlp-vim editorconfig-vim vim-gist @@ -426,6 +429,9 @@ let " let g:tex_flavor = 'latex' ''; + # lua << EOF + # ${builtins.readFile ./init.lua} + # EOF }; in { # Note that this doesn’t merge deeply, so you couldn’t add to plugins. For that @@ -443,7 +449,7 @@ in { }; }; } // config; - programs.vim = config; + # programs.vim = config; # xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON { # # "go.goplsPath" = "${gopls}/bin/gopls";