diff --git a/.config/dconf/user b/.config/dconf/user index 503f722..36829bc 100644 Binary files a/.config/dconf/user and b/.config/dconf/user differ diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 59de958..3520d91 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -58,6 +58,9 @@ vim.keymap.set({ "n" }, "", "j") vim.keymap.set({ "n" }, "", "k") vim.keymap.set({ "n" }, "", "l") +vim.keymap.set('n', 'ld', vim.lsp.buf.definition, { desc = 'vim.lsp.buf.definition()' }) +vim.keymap.set('n', 'lf', vim.lsp.buf.format, { desc = 'vim.lsp.buf.format()' }) + -- [[ Basic Autocommands ]]. -- See `:h lua-guide-autocommands`, `:h autocmd`, `:h nvim_create_autocmd()` -- Highlight when yanking (copying) text. @@ -134,14 +137,14 @@ vim.filetype.add({ }) -- 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') -- 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() -vim.lsp.enable({'lua_ls', 'texlab', 'clangd', 'ocaml-lsp'}) +vim.lsp.enable({ 'lua_ls', 'texlab', 'clangd', 'ocaml-lsp' }) vim.diagnostic.config({ @@ -156,11 +159,11 @@ vim.diagnostic.config({ virtual_text = true, -- Show inline diagnostics }) -vim.keymap.set("n", "dn", "]d", {desc = "Jump to next diagnostic"}) -vim.keymap.set("n", "dp", "[d", {desc = "Jump to previous diagnostic"}) -vim.keymap.set("n", "dN", "]D", {desc = "Jump to last diagnostic"}) -vim.keymap.set("n", "dP", "[D", {desc = "Jump to first diagnostic"}) -vim.keymap.set("n", "ds", "d", {desc = "Display diagnostic on current line"}) +vim.keymap.set("n", "dn", "]d", { desc = "Jump to next diagnostic" }) +vim.keymap.set("n", "dp", "[d", { desc = "Jump to previous diagnostic" }) +vim.keymap.set("n", "dN", "]D", { desc = "Jump to last diagnostic" }) +vim.keymap.set("n", "dP", "[D", { desc = "Jump to first diagnostic" }) +vim.keymap.set("n", "ds", "d", { desc = "Display diagnostic on current line" }) -- [[ UI Configuration ]] vim.pack.add({ @@ -181,6 +184,11 @@ vim.o.winborder = "none" -- Use mini.completion require("mini.completion").setup() +local imap_expr = function(lhs, rhs) + vim.keymap.set('i', lhs, rhs, { expr = true }) +end +imap_expr('', [[pumvisible() ? "\" : "\"]]) +imap_expr('', [[pumvisible() ? "\" : "\"]]) -- Snipped integration for mini.completion require("mini.snippets").setup() @@ -205,11 +213,11 @@ miniclue.setup({ { mode = { "n", "x" }, keys = "" }, -- `[` and `]` keys - { mode = "n", keys = "[" }, - { mode = "n", keys = "]" }, + { mode = "n", keys = "[" }, + { mode = "n", keys = "]" }, -- Built-in completion - { mode = "i", keys = "" }, + { mode = "i", keys = "" }, -- `g` key { mode = { "n", "x" }, keys = "g" }, @@ -223,7 +231,7 @@ miniclue.setup({ { mode = { "i", "c" }, keys = "" }, -- Window commands - { mode = "n", keys = "" }, + { mode = "n", keys = "" }, -- `z` key { mode = { "n", "x" }, keys = "z" }, @@ -252,18 +260,17 @@ miniclue.setup({ -- Use and configure mini.hipatterns local hipatterns = require('mini.hipatterns') hipatterns.setup({ - highlighters = { - -- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE' - fixme = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'MiniHipatternsFixme' }, - hack = { pattern = '%f[%w]()HACK()%f[%W]', group = 'MiniHipatternsHack' }, - todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' }, - note = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'MiniHipatternsNote' }, + highlighters = { + -- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE' + fixme = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'MiniHipatternsFixme' }, + hack = { pattern = '%f[%w]()HACK()%f[%W]', group = 'MiniHipatternsHack' }, + todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' }, + note = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'MiniHipatternsNote' }, - -- Highlight hex color strings (`#rrggbb`) using that color - hex_color = hipatterns.gen_highlighter.hex_color(), - }, + -- Highlight hex color strings (`#rrggbb`) using that color + hex_color = hipatterns.gen_highlighter.hex_color(), + }, }) -- Use mini.notify require("mini.notify").setup() - diff --git a/.config/nvim/lsp/texlab.lua b/.config/nvim/lsp/texlab.lua index de21213..a828cb0 100644 --- a/.config/nvim/lsp/texlab.lua +++ b/.config/nvim/lsp/texlab.lua @@ -140,13 +140,13 @@ return { rootDirectory = nil, build = { executable = 'latexmk', - args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '%f' }, - onSave = false, - forwardSearchAfter = false, + args = { '-lualatex', '-interaction=nonstopmode', '-synctex=1', '%f' }, + onSave = true, + forwardSearchAfter = true, }, forwardSearch = { - executable = nil, - args = {}, + executable = 'okular', + args = {'--unique', 'file:%p#src:%l%f'}, }, chktex = { onOpenAndSave = false,