Nvim: vimtex-doc
This commit is contained in:
parent
3e3ffaa3d3
commit
06b642ae28
@ -16,6 +16,7 @@ require('packer').startup(function(use)
|
||||
|
||||
use { -- LSP Configuration & Plugins
|
||||
'neovim/nvim-lspconfig',
|
||||
optional = true,
|
||||
requires = {
|
||||
-- Automatically install LSPs to stdpath for neovim
|
||||
'williamboman/mason.nvim',
|
||||
@ -45,6 +46,23 @@ require('packer').startup(function(use)
|
||||
},
|
||||
}
|
||||
|
||||
use {
|
||||
'lervag/vimtex',
|
||||
lazy = false,
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
group = vim.api.nvim_create_augroup("lazyvim_vimtex_conceal", { clear = true }),
|
||||
pattern = { "bib", "tex" },
|
||||
callback = function()
|
||||
vim.wo.conceallevel = 2
|
||||
vim.keymap.set('n', "K", "<plug>(vimtex-doc-package)", { desc = "[TeX] Show Package Documentation", remap = true })
|
||||
end,
|
||||
})
|
||||
vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- Disable K mapping conflicts with LSP.
|
||||
vim.g.vimtex_doc_handlers = { 'vimtex#doc#handlers#texdoc' }
|
||||
end
|
||||
}
|
||||
|
||||
use { -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = function()
|
||||
@ -139,6 +157,19 @@ require('packer').startup(function(use)
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
require("which-key").setup {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
use 'majutsushi/tagbar'
|
||||
|
||||
-- Parens
|
||||
@ -594,7 +625,7 @@ local on_attach = function(client, bufnr)
|
||||
|
||||
-- See `:help K` for why this keymap
|
||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||
nmap('<M-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||
|
||||
-- Lesser used LSP functionality
|
||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
|
Loading…
Reference in New Issue
Block a user