diff options
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/lua/plugins/download.lua (renamed from .config/nvim/lua/plugins.lua) | 19 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/init.lua | 5 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/knap.lua | 8 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/lsp.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/treesitter.lua | 16 | ||||
| -rw-r--r-- | .config/nvim/lua/remaps.lua | 10 |
6 files changed, 43 insertions, 18 deletions
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins/download.lua index fb1ed73..0241f26 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins/download.lua @@ -20,23 +20,6 @@ require("lazy").setup({ {'neovim/nvim-lspconfig'}, { "sainnhe/everforest" }, {"Civitasv/cmake-tools.nvim"}, + {"frabjous/knap"}, }) --- Enable preconfigured LSP's -vim.lsp.enable({"clangd", "gopls", "texlab"}) - -require'nvim-treesitter.configs'.setup { - ensure_installed = { "c" }, - sync_install = false, - auto_install = true, - - highlight = { - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..c4b8ea8 --- /dev/null +++ b/.config/nvim/lua/plugins/init.lua @@ -0,0 +1,5 @@ +require("plugins.download") +require("plugins.treesitter") +require("plugins.lsp") +require("plugins.knap") + diff --git a/.config/nvim/lua/plugins/knap.lua b/.config/nvim/lua/plugins/knap.lua new file mode 100644 index 0000000..6ee24c1 --- /dev/null +++ b/.config/nvim/lua/plugins/knap.lua @@ -0,0 +1,8 @@ +local gknapsettings = { + texoutputext = "pdf", + textopdf = "tectonic %docroot%", + textopdfviewerlaunch = "sioyek %outputfile%", + textopdfviewerrefresh = "kill -HUP %pid%" +} +vim.g.knap_settings = gknapsettings + diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..84d4aec --- /dev/null +++ b/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,3 @@ +-- Enable preconfigured LSP's +vim.lsp.enable({"clangd", "gopls", "texlab"}) + diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..b75b2b3 --- /dev/null +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,16 @@ +require'nvim-treesitter.configs'.setup { + ensure_installed = { "c" }, + sync_install = false, + auto_install = true, + + highlight = { + enable = true, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +} + diff --git a/.config/nvim/lua/remaps.lua b/.config/nvim/lua/remaps.lua index e2cbea9..304a6c0 100644 --- a/.config/nvim/lua/remaps.lua +++ b/.config/nvim/lua/remaps.lua @@ -36,3 +36,13 @@ end) vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle) +-- Knap Keybinds +-- F5 processes the document once, and refreshes the view +vim.keymap.set({ 'n', 'v', 'i' },'<leader>kp', function() require("knap").process_once() end) + +-- F6 closes the viewer application, and allows settings to be reset +vim.keymap.set({ 'n', 'v', 'i' },'<leader>ks', function() require("knap").close_viewer() end) + +-- F7 toggles the auto-processing on and off +vim.keymap.set({ 'n', 'v', 'i' },'<leader>ka', function() require("knap").toggle_autopreviewing() end) + |
