Updated some deprecations
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
--- @param client vim.lsp.Client
|
||||||
|
--- @param bufnr number
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
local function opts(desc)
|
local function opts(desc)
|
||||||
if desc then
|
if desc then
|
||||||
@@ -25,7 +27,7 @@ local on_attach = function(client, bufnr)
|
|||||||
-- vim.lsp.buf.code_action()
|
-- vim.lsp.buf.code_action()
|
||||||
-- end, opts("Get code actions"))
|
-- end, opts("Get code actions"))
|
||||||
vim.keymap.set("n", "<leader>vca", function()
|
vim.keymap.set("n", "<leader>vca", function()
|
||||||
require("tiny-code-action").code_action()
|
require("tiny-code-action").code_action({})
|
||||||
end, opts("Get code actions"))
|
end, opts("Get code actions"))
|
||||||
vim.keymap.set("n", "<leader>vr", function()
|
vim.keymap.set("n", "<leader>vr", function()
|
||||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||||
@@ -45,10 +47,10 @@ local on_attach = function(client, bufnr)
|
|||||||
end
|
end
|
||||||
end, opts("Toggle inlay hints"))
|
end, opts("Toggle inlay hints"))
|
||||||
vim.keymap.set("n", "[d", function()
|
vim.keymap.set("n", "[d", function()
|
||||||
vim.diagnostic.goto_next()
|
vim.diagnostic.jump({ count = 1, float = true })
|
||||||
end, opts("Go to next diagnostic"))
|
end, opts("Go to next diagnostic"))
|
||||||
vim.keymap.set("n", "]d", function()
|
vim.keymap.set("n", "]d", function()
|
||||||
vim.diagnostic.goto_prev()
|
vim.diagnostic.jump({ count = -1, float = true })
|
||||||
end, opts("Go to previous diagnostic"))
|
end, opts("Go to previous diagnostic"))
|
||||||
vim.keymap.set("i", "<C-h>", function()
|
vim.keymap.set("i", "<C-h>", function()
|
||||||
vim.lsp.buf.signature_help()
|
vim.lsp.buf.signature_help()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ local prefsFile = configDir .. "/lua/taken/prefs.lua"
|
|||||||
local getAllThemes = function()
|
local getAllThemes = function()
|
||||||
vim.api.nvim_exec_autocmds("User", { pattern = "ThemeSwitcher", modeline = false })
|
vim.api.nvim_exec_autocmds("User", { pattern = "ThemeSwitcher", modeline = false })
|
||||||
|
|
||||||
local colors = vim.fn.globpath(vim.o.rtp, "colors/*", true, 1)
|
local colors = vim.fn.globpath(vim.o.rtp, "colors/*", true, true)
|
||||||
local dataDir = vim.fn.stdpath("data")
|
local dataDir = vim.fn.stdpath("data")
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
---@diagnostic disable-next-line: param-type-mismatch
|
||||||
local newpath = string.gsub(dataDir, "%-", "%%-")
|
local newpath = string.gsub(dataDir, "%-", "%%-")
|
||||||
|
|||||||
Reference in New Issue
Block a user