diff --git a/snippets/kakoune.nix b/snippets/kakoune.nix index 02d5c29..d663147 100644 --- a/snippets/kakoune.nix +++ b/snippets/kakoune.nix @@ -41,6 +41,16 @@ name = "WinSetOption"; option = "filetype=markdown"; commands = "set-option window lintcmd \"proselint\""; + } + { + name = "BufSetOption"; + option = "filetype=markdown"; + commands = "hook buffer BufWritePost .* %{ nop %sh{ pandoc -o \"\${kak_buffile%.md}.pdf\" \"$kak_buffile\" } }"; + } + { + name = "BufCreate"; + option = ".*\.Rmd"; + commands = "hook buffer BufWritePost .* %{ nop %sh{ Rscript -e \"rmarkdown::render(\\\"$kak_buffile\\\", 'pdf_document')\" } }"; } ]; keyMappings = [ @@ -85,6 +95,7 @@ ""; }; + home.packages = with pkgs; [ kak-lsp ]; xdg.configFile."kak-lsp/kak-lsp.toml".source = ./kakoune/kak-lsp.toml;