dotfiles/nvim/lua/config/plugins/rustaceanvim.lua

22 lines
448 B
Lua
Raw Normal View History

2024-01-25 22:09:30 +01:00
local map = require 'config.helpers.keymap'
local n = map 'n'
2023-08-20 14:27:47 +02:00
2023-09-04 23:01:56 +02:00
2024-06-13 21:48:16 +02:00
local function get_opts()
local tools = require 'rustaceanvim'
2023-07-11 23:48:37 +02:00
2024-06-13 21:48:16 +02:00
---@type RustaceanOpts
return {
server = {
on_attach = function(_, bufnr)
n '<C-b>' (tools.hover_actions.hover_actions) { buffer = bufnr }
n '<Leader>a' (tools.code_action_group.code_action_group) { buffer = bufnr }
end,
},
}
end
2023-07-11 23:48:37 +02:00
2024-06-13 21:48:16 +02:00
return function()
vim.g.rustaceanvim = get_opts
2023-10-29 09:47:39 +01:00
end