nvim config update
This commit is contained in:
parent
44d00ebb21
commit
66b146e4b5
3 changed files with 34 additions and 27 deletions
Binary file not shown.
|
|
@ -58,6 +58,9 @@ vim.keymap.set({ "n" }, "<A-j>", "<C-w>j")
|
||||||
vim.keymap.set({ "n" }, "<A-k>", "<C-w>k")
|
vim.keymap.set({ "n" }, "<A-k>", "<C-w>k")
|
||||||
vim.keymap.set({ "n" }, "<A-l>", "<C-w>l")
|
vim.keymap.set({ "n" }, "<A-l>", "<C-w>l")
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>ld', vim.lsp.buf.definition, { desc = 'vim.lsp.buf.definition()' })
|
||||||
|
vim.keymap.set('n', '<leader>lf', vim.lsp.buf.format, { desc = 'vim.lsp.buf.format()' })
|
||||||
|
|
||||||
-- [[ Basic Autocommands ]].
|
-- [[ Basic Autocommands ]].
|
||||||
-- See `:h lua-guide-autocommands`, `:h autocmd`, `:h nvim_create_autocmd()`
|
-- See `:h lua-guide-autocommands`, `:h autocmd`, `:h nvim_create_autocmd()`
|
||||||
-- Highlight when yanking (copying) text.
|
-- Highlight when yanking (copying) text.
|
||||||
|
|
@ -134,14 +137,14 @@ vim.filetype.add({
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Install nvim-treesitter
|
-- Install nvim-treesitter
|
||||||
vim.pack.add({"https://github.com/nvim-treesitter/nvim-treesitter"})
|
vim.pack.add({ "https://github.com/nvim-treesitter/nvim-treesitter" })
|
||||||
require("nvim-treesitter").install('latex', 'lua', 'c', 'ocaml')
|
require("nvim-treesitter").install('latex', 'lua', 'c', 'ocaml')
|
||||||
|
|
||||||
-- See `:h lsp-quickstart` for more details.
|
-- See `:h lsp-quickstart` for more details.
|
||||||
vim.pack.add({"https://github.com/mason-org/mason.nvim"})
|
vim.pack.add({ "https://github.com/mason-org/mason.nvim" })
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
|
|
||||||
vim.lsp.enable({'lua_ls', 'texlab', 'clangd', 'ocaml-lsp'})
|
vim.lsp.enable({ 'lua_ls', 'texlab', 'clangd', 'ocaml-lsp' })
|
||||||
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
|
|
@ -156,11 +159,11 @@ vim.diagnostic.config({
|
||||||
virtual_text = true, -- Show inline diagnostics
|
virtual_text = true, -- Show inline diagnostics
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>dn", "]d", {desc = "Jump to next diagnostic"})
|
vim.keymap.set("n", "<leader>dn", "]d", { desc = "Jump to next diagnostic" })
|
||||||
vim.keymap.set("n", "<leader>dp", "[d", {desc = "Jump to previous diagnostic"})
|
vim.keymap.set("n", "<leader>dp", "[d", { desc = "Jump to previous diagnostic" })
|
||||||
vim.keymap.set("n", "<leader>dN", "]D", {desc = "Jump to last diagnostic"})
|
vim.keymap.set("n", "<leader>dN", "]D", { desc = "Jump to last diagnostic" })
|
||||||
vim.keymap.set("n", "<leader>dP", "[D", {desc = "Jump to first diagnostic"})
|
vim.keymap.set("n", "<leader>dP", "[D", { desc = "Jump to first diagnostic" })
|
||||||
vim.keymap.set("n", "<leader>ds", "<C-w>d", {desc = "Display diagnostic on current line"})
|
vim.keymap.set("n", "<leader>ds", "<C-w>d", { desc = "Display diagnostic on current line" })
|
||||||
|
|
||||||
-- [[ UI Configuration ]]
|
-- [[ UI Configuration ]]
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
|
|
@ -181,6 +184,11 @@ vim.o.winborder = "none"
|
||||||
-- Use mini.completion
|
-- Use mini.completion
|
||||||
require("mini.completion").setup()
|
require("mini.completion").setup()
|
||||||
|
|
||||||
|
local imap_expr = function(lhs, rhs)
|
||||||
|
vim.keymap.set('i', lhs, rhs, { expr = true })
|
||||||
|
end
|
||||||
|
imap_expr('<Tab>', [[pumvisible() ? "\<C-n>" : "\<Tab>"]])
|
||||||
|
imap_expr('<S-Tab>', [[pumvisible() ? "\<C-p>" : "\<S-Tab>"]])
|
||||||
-- Snipped integration for mini.completion
|
-- Snipped integration for mini.completion
|
||||||
require("mini.snippets").setup()
|
require("mini.snippets").setup()
|
||||||
|
|
||||||
|
|
@ -266,4 +274,3 @@ hipatterns.setup({
|
||||||
|
|
||||||
-- Use mini.notify
|
-- Use mini.notify
|
||||||
require("mini.notify").setup()
|
require("mini.notify").setup()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,13 +140,13 @@ return {
|
||||||
rootDirectory = nil,
|
rootDirectory = nil,
|
||||||
build = {
|
build = {
|
||||||
executable = 'latexmk',
|
executable = 'latexmk',
|
||||||
args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '%f' },
|
args = { '-lualatex', '-interaction=nonstopmode', '-synctex=1', '%f' },
|
||||||
onSave = false,
|
onSave = true,
|
||||||
forwardSearchAfter = false,
|
forwardSearchAfter = true,
|
||||||
},
|
},
|
||||||
forwardSearch = {
|
forwardSearch = {
|
||||||
executable = nil,
|
executable = 'okular',
|
||||||
args = {},
|
args = {'--unique', 'file:%p#src:%l%f'},
|
||||||
},
|
},
|
||||||
chktex = {
|
chktex = {
|
||||||
onOpenAndSave = false,
|
onOpenAndSave = false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue