Skip to content

Commit

Permalink
Added noice to the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
elC0mpa committed Feb 6, 2024
1 parent d257f33 commit cdc6eb7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
3 changes: 3 additions & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
"leap.nvim": { "branch": "main", "commit": "14eda5bb233354933baa99b6d40bef3a40dbeaae" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
"nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-notify": { "branch": "master", "commit": "80b67b265530632505193553d05127ae7fe09ddd" },
"nvim-tree.lua": { "branch": "master", "commit": "f39f7b6fcd3865ac2146de4cb4045286308f2935" },
"nvim-treesitter": { "branch": "master", "commit": "e7ea07e42c478cb466cf96124693b447add84011" },
"nvim-treesitter-refactor": { "branch": "master", "commit": "65ad2eca822dfaec2a3603119ec3cc8826a7859e" },
Expand Down
37 changes: 19 additions & 18 deletions lua/maps.lua
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
-- Usual commands
vim.keymap.set('n', '<C-s>', ':w<CR>', { noremap = true })
vim.keymap.set('n', '<C-q>', ':q<CR>', { noremap = true })
vim.keymap.set('n', '<C-w>', ':Bdelete<CR>', { noremap = true })
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<C-s>', ':w<CR>', opts)
vim.keymap.set('n', '<C-q>', ':q<CR>', opts)
vim.keymap.set('n', '<C-w>', ':Bdelete<CR>', opts)

-- Navigation commands
vim.keymap.set('n', '<C-b>', ':NvimTreeToggle<CR>', { noremap = true })
vim.keymap.set('n', '<C-h>', ':bprevious<CR>', { noremap = true })
vim.keymap.set('n', '<C-l>', ':bnext<CR>', { noremap = true })
vim.keymap.set('n', '<C-t>', ':tabnew<CR>', { noremap = true })
vim.keymap.set('i', '<C-t>', '<Esc>:tabnew<CR>', { noremap = true })
vim.keymap.set('n', '<C-b>', ':NvimTreeToggle<CR>', opts)
vim.keymap.set('n', '<C-h>', ':bprevious<CR>', opts)
vim.keymap.set('n', '<C-l>', ':bnext<CR>', opts)
vim.keymap.set('n', '<C-t>', ':tabnew<CR>', opts)
vim.keymap.set('i', '<C-t>', '<Esc>:tabnew<CR>', opts)

-- Split commands
vim.keymap.set('n', '<A-l>', '<C-w>l', { noremap = true })
vim.keymap.set('n', '<A-h>', '<C-w>h', { noremap = true })
vim.keymap.set('n', '<A-v>', '<C-w>v', { noremap = true })
vim.keymap.set('n', '<A-l>', '<C-w>l', opts)
vim.keymap.set('n', '<A-h>', '<C-w>h', opts)
vim.keymap.set('n', '<A-v>', '<C-w>v', opts)

-- Telescope
vim.keymap.set('n', '<C-p>', '<cmd>Telescope find_files<cr>', { noremap = true })
vim.keymap.set('n', '<A-f>', '<cmd>Telescope live_grep<cr>', { noremap = true })
vim.keymap.set('n', '<C-f>', '<cmd>Telescope grep_string<cr>', { noremap = true })
vim.keymap.set('n', '<A-p>', '<cmd>:TodoTelescope<cr>', { noremap = true })
vim.keymap.set('n', '<C-p>', '<cmd>Telescope find_files<cr>', opts)
vim.keymap.set('n', '<A-f>', '<cmd>Telescope live_grep<cr>', opts)
vim.keymap.set('n', '<C-f>', '<cmd>Telescope grep_string<cr>', opts)
vim.keymap.set('n', '<A-p>', '<cmd>:TodoTelescope<cr>', opts)

-- Terminal
vim.keymap.set('n', '<C-j>', ':ToggleTerm<CR>', { noremap = true })
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { noremap = true })
vim.keymap.set('n', '<C-j>', ':ToggleTerm<CR>', opts)
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', opts)

-- " Find
vim.keymap.set('n', '<Esc>', ':noh<CR>', { noremap = true })
vim.keymap.set('n', '<Esc>', ':noh<CR>', opts)
13 changes: 13 additions & 0 deletions lua/plugins_config/noice.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
presets = {
command_palette = true, -- position the cmdline and popupmenu together
},
},
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
}
}

0 comments on commit cdc6eb7

Please sign in to comment.