This commit is contained in:
Javier Pacheco 2023-06-12 06:31:57 -05:00
parent 5d30cd8d4e
commit 92763034f9
3 changed files with 41 additions and 11 deletions

View File

@ -461,7 +461,7 @@ cmp.setup {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete {},
-- ['<C-Space>'] = cmp.mapping.complete {},
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
@ -492,13 +492,13 @@ cmp.setup {
},
formatting = {
-- changing the order of fields so the icon is the first
fields = { "kind", 'abbr', "menu" },
-- fields = {"abbr", "menu"},
-- fields = { "kind", 'abbr', "menu" },
fields = { "abbr", "menu" },
view = {
entries = "wildmenu" -- can be "custom", "wildmenu" or "native"
},
-- here is where the change happens
--
-- -- here is where the change happens
format = lspkind.cmp_format({
mode = 'symbol', -- show only symbol annotations
menu = ({

View File

@ -96,7 +96,7 @@ return {
config = function()
require("zen-mode").setup({
window = {
width = .75, -- width will be 85% of the editor width
width = .75, -- width will be 85% of the editor width
options = {
number = false,
relativenumber = false,
@ -105,4 +105,37 @@ return {
})
end,
},
-- [[ Rust Baby!! ]]
{
'simrat39/rust-tools.nvim',
config = function()
local rt = require("rust-tools")
local mason_registry = require("mason-registry")
local codelldb = mason_registry.get_package("codelldb")
local extension_path = codelldb:get_install_path() .. "/extension/"
local codelldb_path = extension_path .. "adapter/codelldb"
local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib"
rt.setup({
dap = {
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path),
},
server = {
capabilities = require("cmp_nvim_lsp").default_capabilities(),
on_attach = function(_, bufnr)
vim.keymap.set("n", "<leader>k", rt.hover_actions.hover_actions, { buffer = bufnr })
vim.keymap.set("n", "<leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
end,
},
tools = {
hover_actions = {
auto_focus = true,
},
},
})
end
}
--
}

View File

@ -19,7 +19,7 @@ return {
'jay-babu/mason-nvim-dap.nvim',
-- Add your own debuggers here
'leoluz/nvim-dap-go',
},
config = function()
local dap = require 'dap'
@ -38,7 +38,7 @@ return {
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
'codellb',
},
}
@ -79,8 +79,5 @@ return {
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- Install golang specific config
require('dap-go').setup()
end,
}