Updated config

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2024-01-30 14:15:36 +01:00
parent 6c04c004b1
commit 733e5a41d6
3 changed files with 25 additions and 2 deletions

View File

@@ -15,7 +15,10 @@ local n = {
["N"] = { "Nzzzv" },
["Q"] = { "<nop>" },
["0"] = { "^", desc = "Go to first non blank character in line" },
["<leader>0"] = { "0", desc = "Go to true line beggining" },
["<leader>q"] = { ":noh<CR>" },
-- buffer
["<leader>bf"] = { vim.lsp.buf.format, desc = "Format buffer" },
["<leader>bs"] = { ":write <CR>", desc = "Save buffer" },

View File

@@ -1,7 +1,6 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
enabled = false,
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",

View File

@@ -4,6 +4,7 @@ return {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
@@ -19,6 +20,27 @@ return {
vim.opt.completeopt = "menu,menuone,noselect"
cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
},
})
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
}, {
{
name = "cmdline",
option = {
ignore_cmds = { "Man", "!" },
},
},
}),
})
cmp.setup({
snippet = {
expand = function(args)
@@ -33,7 +55,6 @@ return {
["<Tab>"] = nil,
["<S-Tab>"] = nil,
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" }, -- lsp
{ name = "luasnip" }, -- snippets