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',
|
||||
@ -39,12 +40,29 @@ require('packer').startup(function(use)
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'hrsh7th/cmp-buffer', -- Buffer completion
|
||||
'hrsh7th/cmp-path', -- File path completion
|
||||
'hrsh7th/cmp-buffer', -- Buffer completion
|
||||
'hrsh7th/cmp-path', -- File path completion
|
||||
'hrsh7th/cmp-nvim-lua', -- Lua completion
|
||||
},
|
||||
}
|
||||
|
||||
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()
|
||||
@ -53,10 +71,10 @@ require('packer').startup(function(use)
|
||||
}
|
||||
|
||||
use {
|
||||
"theRealCarneiro/hyprland-vim-syntax",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
ft = "hypr",
|
||||
}
|
||||
"theRealCarneiro/hyprland-vim-syntax",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
ft = "hypr",
|
||||
}
|
||||
|
||||
|
||||
use { -- Additional text objects via treesitter
|
||||
@ -70,11 +88,11 @@ require('packer').startup(function(use)
|
||||
use 'lewis6991/gitsigns.nvim'
|
||||
|
||||
-- use 'navariau/onedark.nvim' -- Theme inspired by Atom
|
||||
use 'sainnhe/edge' -- Colorscheme
|
||||
use 'nvim-lualine/lualine.nvim' -- Fancier statusline
|
||||
use 'sainnhe/edge' -- Colorscheme
|
||||
use 'nvim-lualine/lualine.nvim' -- Fancier statusline
|
||||
use 'lukas-reineke/indent-blankline.nvim' -- Add indentation guides even on blank lines
|
||||
use 'numToStr/Comment.nvim' -- "gc" to comment visual regions/lines
|
||||
use 'tpope/vim-sleuth' -- Detect tabstop and shiftwidth automatically
|
||||
use 'numToStr/Comment.nvim' -- "gc" to comment visual regions/lines
|
||||
use 'tpope/vim-sleuth' -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
-- Fuzzy Finder (files, lsp, etc)
|
||||
use { 'nvim-telescope/telescope.nvim', branch = '0.1.x', requires = { 'nvim-lua/plenary.nvim' } }
|
||||
@ -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
|
||||
@ -565,10 +596,10 @@ local on_attach = function(client, bufnr)
|
||||
|
||||
if client.name == "ltex" then
|
||||
require("ltex_extra").setup {
|
||||
load_langs = { "de-DE", "en-US" }, -- table <string> : languages for witch dictionaries will be loaded
|
||||
init_check = true, -- boolean : whether to load dictionaries on startup
|
||||
load_langs = { "de-DE", "en-US" }, -- table <string> : languages for witch dictionaries will be loaded
|
||||
init_check = true, -- boolean : whether to load dictionaries on startup
|
||||
path = "/home/rad4day/.config/nvim/ltex", -- string : path to store dictionaries. Relative path uses current working directory
|
||||
log_level = "none", -- string : "none", "trace", "debug", "info", "warn", "error", "fatal"
|
||||
log_level = "none", -- string : "none", "trace", "debug", "info", "warn", "error", "fatal"
|
||||
}
|
||||
end
|
||||
|
||||
@ -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')
|
||||
@ -785,8 +816,8 @@ cmp.setup {
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol_text', -- show only symbol annotations
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
mode = 'symbol_text', -- show only symbol annotations
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||
symbol_map = {
|
||||
Copilot = "",
|
||||
|
Loading…
Reference in New Issue
Block a user