diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 1e5c82b..aacf18f 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -8,6 +8,7 @@ "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" }, + "markview.nvim": { "branch": "main", "commit": "31f9a2611e0f373d19281c129b9a40272c124d26" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" }, "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, @@ -18,13 +19,16 @@ "oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" }, "outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "sqlite.nvim": { "branch": "master", "commit": "a8466c830a89794c2eafa41b41dd11fdf4a0d7ca" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "0294ae3eafe662c438addb8692d9c98ef73a983e" }, + "time-tracker.nvim": { "branch": "master", "commit": "4127c4b5fecaf5f5cb3aa840707e58bb88eb9bf0" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, "undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" }, "vim-flog": { "branch": "master", "commit": "665b16ac8915f746bc43c9572b4581a5e9047216" }, "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vimtex": { "branch": "master", "commit": "4ee6801bf6bd48420c31da6b59ed24ba720b18d9" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index 00ccf97..72f048e 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -1,3 +1,37 @@ +-- +-- +-- LSP configs +-- +-- + + +vim.lsp.config("texlab", { + settings = { + texlab = { + rootDirectory = nil, + build = { + executable = 'latexmk', + args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '%f' }, + onSave = false, + forwardSearchAfter = false, + }, + forwardSearch = { + executable = nil, + args = {}, + }, + chktex = { + onOpenAndSave = false, + onEdit = false, + }, + diagnosticsDelay = 300, + latexFormatter = 'tex-fmt', + bibtexFormatter = 'tex-fmt', + }, + }, + +}) + + -- -- -- Completion config diff --git a/nvim/.config/nvim/lua/plugins/markview.lua b/nvim/.config/nvim/lua/plugins/markview.lua new file mode 100644 index 0000000..c05f7d8 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/markview.lua @@ -0,0 +1,23 @@ +return { + "OXY2DEV/markview.nvim", + lazy = false, +} +-- return { +-- "iamcco/markdown-preview.nvim", +-- cmd = { "MarkdownPreview" }, +-- build = function(plugin) +-- if vim.fn.executable "npx" then +-- vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install") +-- else +-- vim.cmd [[Lazy load markdown-preview.nvim]] +-- vim.fn["mkdp#util#install"]() +-- end +-- end, +-- init = function() +-- if vim.fn.executable "npx" then +-- vim.g.mkdp_filetypes = { +-- "markdown" +-- } +-- end +-- end +-- } diff --git a/nvim/.config/nvim/lua/plugins/time-tracker.lua b/nvim/.config/nvim/lua/plugins/time-tracker.lua new file mode 100644 index 0000000..66a44ac --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/time-tracker.lua @@ -0,0 +1,10 @@ +return { + "3rd/time-tracker.nvim", + dependencies = { + "3rd/sqlite.nvim" + }, + event = "VeryLazy", + opts = { + data_file = vim.fn.stdpath("data") .. "/time-tracker.db" + } +} diff --git a/nvim/.config/nvim/lua/plugins/vimtex.lua b/nvim/.config/nvim/lua/plugins/vimtex.lua new file mode 100644 index 0000000..c594513 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/vimtex.lua @@ -0,0 +1,63 @@ +return { + "lervag/vimtex", + ft = { + "tex", + "bib" + }, + config = function() + -- General configuration + + vim.cmd("syntax enable") + + vim.g.vimtex_compiler_latexmk = { + out_dir = 'build', + options = { + '-shell-escape', + '-verbose', + '-file-line-error', + '-interaction=nonstopmode', + '-synctex=1' + } + } + + -- TODO: Fix `VimTex: Viewer cannot find Zathura window ID` + vim.g.vimtex_view_method = 'zathura' + vim.g.vimtex_quickfix_mode = 0 + + -- Concealment + + -- TODO: Use lua instead of vimscript + vim.cmd([[set conceallevel=1]]) + vim.cmd([[ + let g:vimtex_syntax_conceal = { + \ 'accents': 1, + \ 'ligatures': 1, + \ 'cites': 1, + \ 'fancy': 1, + \ 'spacing': 0, + \ 'greek': 1, + \ 'math_bounds': 1, + \ 'math_delimiters': 1, + \ 'math_fracs': 1, + \ 'math_super_sub': 0, + \ 'math_symbols': 1, + \ 'sections': 0, + \ 'styles': 0, + \} + + let g:vimtex_syntax_custom_cmds = [ + \ {'name': 'bm', 'mathmode': 1, 'argstyle': 'bold', 'conceal': 1}, + \] + ]]) + + -- Synctex configuration + + vim.g.vimtex_compiler_progname = 'nvr' + + local options = string.format( + '--reuse-window --inverse-search="nvr --servername %s +%%2 %%1" --forward-search-file @tex --forward-search-line @line @pdf', + vim.v.servername) + local command = string.format("let g:vimtex_view_general_options='%s'", options) + vim.cmd(command) + end +}