1
0

Fix or disable some lua linter complaints

This commit is contained in:
Patrick Auernig 2024-05-24 14:03:16 +02:00
parent 35e5df4e19
commit 871a816d5c
5 changed files with 7 additions and 5 deletions

View File

@ -9,7 +9,7 @@ spec.dependencies = {
} }
spec.config = function() spec.config = function()
require("crates").setup() require("crates").setup({})
local cmp = require("cmp") local cmp = require("cmp")

View File

@ -19,7 +19,7 @@ end
local function format_file() local function format_file()
local bufnr = vim.api.nvim_get_current_buf() local bufnr = vim.api.nvim_get_current_buf()
local lsp_client = vim.lsp.get_active_clients({ bufnr = bufnr }) local lsp_client = vim.lsp.get_clients({ bufnr = bufnr })
if #lsp_client ~= 0 then if #lsp_client ~= 0 then
vim.lsp.buf.format({ async = false, timeout_ms = 5000 }) vim.lsp.buf.format({ async = false, timeout_ms = 5000 })

View File

@ -46,6 +46,8 @@ local function lua_ls_setup(lsp_config)
end end
local function toggle_inlay_hints() local function toggle_inlay_hints()
-- the docs suggest this, so this should be fine
---@diagnostic disable-next-line: missing-parameter
local to_enable = not vim.lsp.inlay_hint.is_enabled() local to_enable = not vim.lsp.inlay_hint.is_enabled()
vim.lsp.inlay_hint.enable(to_enable) vim.lsp.inlay_hint.enable(to_enable)
local status = to_enable and "enabled" or "disabled" local status = to_enable and "enabled" or "disabled"

View File

@ -36,7 +36,7 @@ spec.config = function()
end end
}) })
resession.setup() resession.setup({})
end end
return spec return spec

View File

@ -8,7 +8,7 @@ spec.dependencies = {
} }
spec.config = function() spec.config = function()
require("nvim-treesitter.configs").setup { require("nvim-treesitter.configs").setup({
ensure_installed = { ensure_installed = {
"rust", "rust",
"lua", "lua",
@ -27,7 +27,7 @@ spec.config = function()
}, },
endwise = { enable = true } endwise = { enable = true }
} })
require("treesitter-context").setup() require("treesitter-context").setup()