1
0

improvements and font change

This commit is contained in:
2025-02-14 03:50:37 +01:00
parent 5adbb64c2b
commit 51c4fb6166
6 changed files with 66 additions and 11 deletions

View File

@@ -0,0 +1,21 @@
local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set("n", "<leader>a", function()
vim.cmd.RustLsp("codeAction") -- supports rust-analyzer's grouping
-- or vim.lsp.buf.codeAction() if you don't want grouping.
end, { silent = true, buffer = bufnr })
vim.keymap.set(
"n",
"K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
function()
vim.cmd.RustLsp({ "hover", "actions" })
end,
{ silent = true, buffer = bufnr }
)
vim.keymap.set(
"n",
"<leader>?", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end,
{ buffer = bufnr }
)

View File

@@ -37,7 +37,7 @@ return {
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- See the full "keymap" documentation for information on defining your own keymap.
keymap = {
preset = "enter",
preset = "super-tab",
},
completion = {
@@ -223,11 +223,11 @@ return {
opts = {
servers = {
-- brew install rust-analyzer
rust_analyzer = {
settings = {
["rust-analyzer"] = {},
},
},
-- rust_analyzer = {
-- settings = {
-- ["rust-analyzer"] = {},
-- },
-- },
-- brew install bash-language-server
bashls = {},
-- lua_ls = {
@@ -257,4 +257,30 @@ return {
end
end,
},
{
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
config = function()
vim.g.rustaceanvim = {
tools = {
float_win_config = {
border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
},
max_width = nil,
max_height = nil,
auto_focus = true,
},
},
}
end,
},
}