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