feat: initial commit
This commit is contained in:
46
nvim/lua/vimtex-config.lua
Normal file
46
nvim/lua/vimtex-config.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
-- " This is necessary for VimTeX to load properly. The "indent" is optional.
|
||||
-- " Note: Most plugin managers will do this automatically!
|
||||
-- filetype plugin indent on
|
||||
|
||||
-- " This enables Vim's and neovim's syntax-related features. Without this, some
|
||||
-- " VimTeX features will not work (see ":help vimtex-requirements" for more
|
||||
-- " info).
|
||||
-- " Note: Most plugin managers will do this automatically!
|
||||
-- syntax enable
|
||||
|
||||
-- " Viewer options: One may configure the viewer either by specifying a built-in
|
||||
-- " viewer method:
|
||||
-- let g:vimtex_view_method = 'zathura'
|
||||
|
||||
-- " Or with a generic interface:
|
||||
-- let g:vimtex_view_general_viewer = 'okular'
|
||||
-- let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
|
||||
|
||||
-- " VimTeX uses latexmk as the default compiler backend. If you use it, which is
|
||||
-- " strongly recommended, you probably don't need to configure anything. If you
|
||||
-- " want another compiler backend, you can change it as follows. The list of
|
||||
-- " supported backends and further explanation is provided in the documentation,
|
||||
-- " see ":help vimtex-compiler".
|
||||
-- let g:vimtex_compiler_method = 'latexrun'
|
||||
|
||||
-- " Most VimTeX mappings rely on localleader and this can be changed with the
|
||||
-- " following line. The default is usually fine and is the symbol "\".
|
||||
vim.cmd("filetype plugin indent on")
|
||||
vim.cmd("syntax enable")
|
||||
vim.g.vimtex_view_method = 'zathura'
|
||||
vim.g.vimtex_compiler_method = 'latexrun'
|
||||
vim.g.vimtex_toc_config = {
|
||||
name = 'TOC',
|
||||
layers = { 'content', 'todo', 'include' },
|
||||
resize = 1,
|
||||
split_width = 50,
|
||||
todo_sorted = 0,
|
||||
show_help = 1,
|
||||
show_numbers = 1,
|
||||
mode = 2,
|
||||
}
|
||||
-- Key mappings
|
||||
vim.api.nvim_set_keymap('n', '<leader>m', ':VimtexTocOpen<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>v', ':VimtexView<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>c', ':VimtexCompile<CR>', { noremap = true, silent = true })
|
||||
|
||||
Reference in New Issue
Block a user