This commit is contained in:
h 2024-11-14 03:41:41 -05:00
parent ceb580acbe
commit 7fe2f7b438
5 changed files with 33 additions and 31 deletions

View File

@ -1,2 +1,2 @@
$pdf_previewer = "zathura %O %S"; $pdf_previewer = "zathura %O %S";
$pdflatex = "xelatex -shell-escape %O %S"; $pdflatex = "xelatex -synctex=1 -shell-escape %O %S";

View File

@ -96,7 +96,7 @@ local lsp_confs = {
}, },
gopls = {}, gopls = {},
dartls = {}, dartls = {},
tsserver = { ts_ls = {
root_dir = find_repo_root({ root_dir = find_repo_root({
configfiles = { "tsconfig.json", "jsconfig.json", "package.json" } configfiles = { "tsconfig.json", "jsconfig.json", "package.json" }
}), }),
@ -168,16 +168,16 @@ for server, conf in pairs(lsp_confs) do
end end
end end
local null_ls = require('null-ls') -- local null_ls = require('null-ls')
null_ls.setup({ -- null_ls.setup({
sources = { -- sources = {
null_ls.builtins.diagnostics.chktex, -- -- null_ls.builtins.diagnostics.chktex,
null_ls.builtins.diagnostics.cppcheck, -- null_ls.builtins.diagnostics.cppcheck,
null_ls.builtins.diagnostics.shellcheck, -- null_ls.builtins.diagnostics.shellcheck,
--
null_ls.builtins.code_actions.gitsigns, -- null_ls.builtins.code_actions.gitsigns,
}, -- },
}) -- })
vim.diagnostic.config({ vim.diagnostic.config({
severity_sort = true, severity_sort = true,
@ -226,7 +226,7 @@ M.format_on_save_hook = function()
if enabled ~= 0 and enabled ~= false then if enabled ~= 0 and enabled ~= false then
if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "latex" and if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "latex" and
vim.bo.filetype ~= "qf" and vim.bo.filetype ~= "bib" and vim.bo.filetype ~= "" and vim.bo.filetype ~= "pdf" vim.bo.filetype ~= "qf" and vim.bo.filetype ~= "bib" and vim.bo.filetype ~= "" and vim.bo.filetype ~= "pdf"
and vim.bo.filetype ~= "conf" then and vim.bo.filetype ~= "conf" and vim.bo.filetype ~= "TelescopePrompt" then
vim.lsp.buf.format({ async = false }) vim.lsp.buf.format({ async = false })
end end
end end
@ -241,17 +241,18 @@ vim.cmd [[
augroup END augroup END
]] ]]
vim.api.nvim_create_autocmd({ 'FileType', vim.api.nvim_create_autocmd(
}, { { 'FileType',
}, {
pattern = "*", pattern = "*",
callback = function() callback = function()
if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "late" and if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "latex" and
vim.bo.filetype ~= "qf" and vim.bo.filetype ~= "bib" and vim.bo.filetype ~= "" and vim.bo.filetype ~= "pdf" vim.bo.filetype ~= "qf" and vim.bo.filetype ~= "bib" and vim.bo.filetype ~= "" and vim.bo.filetype ~= "pdf"
and vim.bo.filetype ~= "conf" then and vim.bo.filetype ~= "conf" and vim.bo.filetype ~= "TelescopePrompt" then
vim.cmd [[ :COQnow -s ]] vim.cmd [[ :COQnow -s ]]
end end
end end
}) })
-- vim.api.nvim_create_autocmd({ 'FileType', 'BufRead', 'BufReadPre', 'BufReadPost', 'BufWrite', 'BufWritePre', -- vim.api.nvim_create_autocmd({ 'FileType', 'BufRead', 'BufReadPre', 'BufReadPost', 'BufWrite', 'BufWritePre',
-- 'BufWritePost' }, { -- 'BufWritePost' }, {

View File

@ -14,6 +14,7 @@ o.tabstop = 4
o.shiftwidth = 0 o.shiftwidth = 0
o.viminfo = '' o.viminfo = ''
vim.g.base16colorspace = 256 vim.g.base16colorspace = 256
vim.g.vimtex_view_method = "zathura"
o.termguicolors = true o.termguicolors = true
vim.cmd [[ vim.cmd [[

View File

@ -26,7 +26,7 @@ return require('packer').startup({
run = ':TSUpdate', run = ':TSUpdate',
config = function() config = function()
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
highlight = { enable = true }, highlight = { enable = true, disable = { "latex" } },
indent = { enable = true }, indent = { enable = true },
ensure_installed = "all", ensure_installed = "all",
}) })
@ -177,12 +177,12 @@ return require('packer').startup({
'ms-jpq/coq.artifacts', 'ms-jpq/coq.artifacts',
}, },
}, },
{ -- {
'jose-elias-alvarez/null-ls.nvim', -- 'jose-elias-alvarez/null-ls.nvim',
requires = { -- requires = {
'nvim-lua/plenary.nvim', -- 'nvim-lua/plenary.nvim',
}, -- },
}, -- },
}, },
config = import('lsp'), config = import('lsp'),
} }

View File

@ -23,7 +23,7 @@
\RequirePackage{listings} \RequirePackage{listings}
\RequirePackage{geometry} \RequirePackage{geometry}
\RequirePackage{graphicx} \RequirePackage{graphicx}
\RequirePackage[usenames,dvipsnames]{xcolor} \RequirePackage[dvipsnames]{xcolor}
\RequirePackage{bm} \RequirePackage{bm}
\RequirePackage{siunitx}[=v2] \RequirePackage{siunitx}[=v2]
\RequirePackage{physics} \RequirePackage{physics}