updates
This commit is contained in:
@@ -11,6 +11,9 @@ M.defaults = function()
|
||||
local servers = { "html", "cssls", "lua_ls", "biome", "solidity_ls_nomicfoundation" }
|
||||
|
||||
vim.lsp.inlay_hint.enable()
|
||||
vim.lsp.handlers["textDocument/codeAction"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = "rounded", -- You can also use 'single', 'double', 'solid', etc.
|
||||
})
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
@@ -41,11 +44,16 @@ M.on_attach = function(client, bufnr)
|
||||
require("telescope.builtin").lsp_references()
|
||||
end, opts "LSP References")
|
||||
|
||||
map("n", "ga", vim.lsp.buf.code_action, opts "Code Actions")
|
||||
-- map("n", "ga", function()
|
||||
-- vim.lsp.buf.code_action { async = true }
|
||||
-- end, opts "Code Actions")
|
||||
end
|
||||
|
||||
M.rustacean = {
|
||||
server = {
|
||||
cmd = function()
|
||||
return { "/home/naps62/.cargo/bin/ra-multiplex" }
|
||||
end,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
on_attach = function(client, bufnr)
|
||||
@@ -55,9 +63,9 @@ M.rustacean = {
|
||||
return { buffer = bufnr, desc = "LSP " .. desc }
|
||||
end
|
||||
|
||||
map("n", "ga", function()
|
||||
vim.cmd.RustLsp "codeAction"
|
||||
end, opts "Rust Code Actions")
|
||||
-- map("n", "ga", function()
|
||||
-- vim.cmd.RustLsp "codeAction"
|
||||
-- end, opts "Rust Code Actions")
|
||||
end,
|
||||
},
|
||||
tools = {
|
||||
|
||||
@@ -35,8 +35,8 @@ local options = {
|
||||
height = 0.80,
|
||||
},
|
||||
mappings = {
|
||||
n = { ["<C-q>"] = open_with_trouble, ["t"] = open_with_trouble },
|
||||
i = { ["<C-t>"] = open_with_trouble },
|
||||
n = { ["<C-q>"] = open_with_trouble, ["<C-t>"] = open_with_trouble },
|
||||
i = { ["<C-q>"] = open_with_trouble, ["<C-t>"] = open_with_trouble },
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -20,7 +20,3 @@ map("i", "<C-s>", "<C-o>:update<CR><Esc>")
|
||||
|
||||
-- remove search highlight
|
||||
map("n", "<leader>,", ":noh<cr>")
|
||||
|
||||
-- quickfix navigation
|
||||
map("n", "[q", "<cmd>:cprev<cr>")
|
||||
map("n", "]q", "<cmd>:cnext<cr>")
|
||||
|
||||
@@ -12,3 +12,5 @@ o.relativenumber = true
|
||||
o.showmatch = true
|
||||
o.smartcase = true
|
||||
o.gdefault = true
|
||||
|
||||
o.fillchars = "eob: ,diff: "
|
||||
|
||||
@@ -16,4 +16,18 @@ return {
|
||||
{ "<leader>g", "<cmd>Neogit<CR>", desc = "Neogit" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
opts = {
|
||||
enhanced_diff_hl = true,
|
||||
file_panel = {
|
||||
win_config = {
|
||||
width = 25,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -31,4 +31,27 @@ return {
|
||||
event = "LspAttach",
|
||||
opts = {}, -- required, even if empty
|
||||
},
|
||||
|
||||
{
|
||||
"aznhe21/actions-preview.nvim",
|
||||
config = function()
|
||||
local hl = require "actions-preview.highlight"
|
||||
require("actions-preview").setup {
|
||||
backend = { "nui" },
|
||||
highlight_command = { hl.delta() },
|
||||
|
||||
nui = {
|
||||
keymap = { "q", "<C-c>" },
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"ga",
|
||||
function()
|
||||
require("actions-preview").code_actions()
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
return {
|
||||
{
|
||||
"levouh/tint.nvim",
|
||||
config = function()
|
||||
require("tint").setup {
|
||||
tint = -10,
|
||||
tint_background_colors = true,
|
||||
|
||||
window_ignore_function = function(winid)
|
||||
local bufid = vim.api.nvim_win_get_buf(winid)
|
||||
local buftype = vim.api.nvim_get_option_value("buftype", { buf = bufid })
|
||||
return buftype == "nofile"
|
||||
end,
|
||||
}
|
||||
end,
|
||||
},
|
||||
-- { "nvchad/base46", enabled = false },
|
||||
|
||||
-- {
|
||||
|
||||
@@ -40,6 +40,18 @@ return {
|
||||
"<cmd>Trouble qflist toggle<cr>",
|
||||
desc = "Quickfix List (Trouble)",
|
||||
},
|
||||
{
|
||||
"]q",
|
||||
function()
|
||||
require("trouble").next { jump = true }
|
||||
end,
|
||||
},
|
||||
{
|
||||
"[q",
|
||||
function()
|
||||
require("trouble").prev { jump = true }
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user