chore: run lint and fix errors
This commit is contained in:
@@ -57,7 +57,7 @@ for _, provider in ipairs { "node", "perl", "python3", "ruby" } do
|
||||
end
|
||||
|
||||
-- add binaries installed by mason.nvim to path
|
||||
local is_windows = vim.fn.has("win32") ~= 0
|
||||
local is_windows = vim.fn.has "win32" ~= 0
|
||||
vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH
|
||||
|
||||
-------------------------------------- autocmds ------------------------------------------
|
||||
@@ -112,7 +112,7 @@ vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
|
||||
group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }),
|
||||
callback = function(args)
|
||||
local file = vim.api.nvim_buf_get_name(args.buf)
|
||||
local buftype = vim.api.nvim_buf_get_option(args.buf, "buftype")
|
||||
local buftype = vim.bo[args.buf].buftype
|
||||
|
||||
if not vim.g.ui_entered and args.event == "UIEnter" then
|
||||
vim.g.ui_entered = true
|
||||
@@ -123,12 +123,10 @@ vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
|
||||
vim.api.nvim_del_augroup_by_name "NvFilePost"
|
||||
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_exec_autocmds("FileType", {})
|
||||
|
||||
if vim.g.editorconfig then
|
||||
require("editorconfig").config(args.buf)
|
||||
end
|
||||
end, 0)
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -202,14 +202,14 @@ M.lspconfig = {
|
||||
|
||||
["[d"] = {
|
||||
function()
|
||||
vim.diagnostic.goto_prev { float = { border = "rounded" } }
|
||||
vim.diagnostic.jump { count = -1, float = { border = "rounded" } }
|
||||
end,
|
||||
"Goto prev",
|
||||
},
|
||||
|
||||
["]d"] = {
|
||||
function()
|
||||
vim.diagnostic.goto_next { float = { border = "rounded" } }
|
||||
vim.diagnostic.jump { float = { border = "rounded" } }
|
||||
end,
|
||||
"Goto next",
|
||||
},
|
||||
|
||||
@@ -106,7 +106,7 @@ M.lazy_load = function(plugin)
|
||||
if plugin == "nvim-lspconfig" then
|
||||
vim.cmd "silent! do FileType"
|
||||
end
|
||||
end, 0)
|
||||
end)
|
||||
else
|
||||
require("lazy").load { plugins = plugin }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user