Skip to content

Commit 132d40f

Browse files
committed
more updates
1 parent eff30a5 commit 132d40f

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

init.lua

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,34 @@ require('lazy').setup({
237237
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
238238
{
239239
'nvim-tree/nvim-tree.lua',
240-
opts = {},
240+
opts = {
241+
vim.keymap.set('n', '<C-n>', '<cmd>NvimTreeToggle<CR>', { desc = 'nvimtree toggle window' }),
242+
vim.keymap.set('n', '<leader>e', '<cmd>NvimTreeFocus<CR>', { desc = 'nvimtree focus window' }),
243+
},
244+
},
245+
{
246+
'akinsho/toggleterm.nvim',
247+
version = '*',
248+
config = true,
249+
opts = {
250+
vim.keymap.set('n', '<leader>h', '<cmd>ToggleTerm<CR>', { desc = 'toggleterm toggle terminal' }),
251+
},
252+
},
253+
{
254+
'williamboman/mason.nvim',
255+
opts = {
256+
ensure_installed = {
257+
'rust_analyzer',
258+
'clangd',
259+
'clang_format',
260+
'go_pls',
261+
},
262+
function()
263+
require('mason').setup()
264+
end,
265+
},
241266
},
242-
'williamboman/mason.nvim',
267+
243268
-- NOTE: Plugins can also be added by using a table,
244269
-- with the first argument being the link and the following
245270
-- keys can be used to configure plugin behavior/loading/etc.
@@ -425,7 +450,18 @@ require('lazy').setup({
425450
'neovim/nvim-lspconfig',
426451
dependencies = {
427452
-- Automatically install LSPs and related tools to stdpath for Neovim
428-
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
453+
{
454+
'williamboman/mason.nvim',
455+
opts = {
456+
ensure_installed = {
457+
'clangd',
458+
'rust-analyzer',
459+
'go_pls',
460+
'clang_format',
461+
},
462+
},
463+
config = true,
464+
}, -- NOTE: Must be loaded before dependants
429465
'williamboman/mason-lspconfig.nvim',
430466
'WhoIsSethDaniel/mason-tool-installer.nvim',
431467

@@ -742,7 +778,7 @@ require('lazy').setup({
742778
-- Accept ([y]es) the completion.
743779
-- This will auto-import if your LSP supports it.
744780
-- This will expand snippets if the LSP sent a snippet.
745-
['<C-y>'] = cmp.mapping.confirm { select = true },
781+
['<Enter>'] = cmp.mapping.confirm { select = true },
746782

747783
-- If you prefer more traditional completion keymaps,
748784
-- you can uncomment the following lines

0 commit comments

Comments
 (0)