complete neovim 0.12 compatibility audit
This commit is contained in:
parent
f6a1c8640c
commit
ec7f6c8121
8 changed files with 45 additions and 28 deletions
|
|
@ -50,10 +50,10 @@ map('n', '<leader>xE', function()
|
|||
vim.diagnostic.setqflist({ severity = vim.diagnostic.severity.ERROR })
|
||||
end, { desc = 'Diagnostics: All errors (quickfix)', silent = true })
|
||||
map('n', '[d', function()
|
||||
vim.diagnostic.goto_prev({ float = false })
|
||||
vim.diagnostic.jump({ count = -1, float = false })
|
||||
end, { desc = 'Diagnostics: Previous diagnostic', silent = true })
|
||||
map('n', ']d', function()
|
||||
vim.diagnostic.goto_next({ float = false })
|
||||
vim.diagnostic.jump({ count = 1, float = false })
|
||||
end, { desc = 'Diagnostics: Next diagnostic', silent = true })
|
||||
map('n', '<leader>xd', function()
|
||||
pcall(vim.diagnostic.open_float)
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ return {
|
|||
-- Note: This runs once at config load, checks cwd for phpcs.xml
|
||||
local cwd = vim.fn.getcwd()
|
||||
local has_project_ruleset =
|
||||
vim.loop.fs_stat(cwd .. "/phpcs.xml")
|
||||
or vim.loop.fs_stat(cwd .. "/phpcs.xml.dist")
|
||||
vim.uv.fs_stat(cwd .. "/phpcs.xml")
|
||||
or vim.uv.fs_stat(cwd .. "/phpcs.xml.dist")
|
||||
|
||||
local phpcs_args = { "-q", "--report=json" }
|
||||
if not has_project_ruleset then
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ return {
|
|||
-- Disable for very large files
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue