diff --git a/init.lua b/init.lua index 01ee281..15794b2 100644 --- a/init.lua +++ b/init.lua @@ -25,8 +25,8 @@ vim.pack.add({ { src = gh("nvim-mini/mini.icons") }, -- { src = gh("nvim-mini/mini.pick" }, - { src = gh("nvim-telescope/telescope.nvim"), version = "master" }, - { src = gh("nvim-telescope/telescope-fzf-native.nvim"), build = "make" }, + { src = gh("nvim-telescope/telescope.nvim"), version = "master" }, + { src = gh("nvim-telescope/telescope-fzf-native.nvim"), build = "make" }, { src = gh("kyazdani42/nvim-web-devicons") }, { src = gh("lewis6991/gitsigns.nvim") }, @@ -35,7 +35,7 @@ vim.pack.add({ -- { src = gh("nvim-treesitter/nvim-treesitter"), version = "main" }, { src = "https://github.com/romus204/tree-sitter-manager.nvim" }, - { src = gh("saghen/blink.cmp"), version = "v1.9.1" }, + { src = gh("saghen/blink.cmp"), version = "v1.9.1" }, { src = gh("rafamadriz/friendly-snippets") }, { src = gh("nvim-lualine/lualine.nvim") }, @@ -170,13 +170,13 @@ end local function setup_lsp_keymaps() local lsp_group = vim.api.nvim_create_augroup("user-lsp-keymaps", { clear = true }) local lsp_maps = { - { "n", "ca", vim.lsp.buf.code_action, "[C]ode [A]ction" }, - { "n", "rn", vim.lsp.buf.rename, "[R]e[n]ame" }, - { "n", "gd", vim.lsp.buf.definition, "[G]oto [D]efinition" }, - { "n", "gr", vim.lsp.buf.references, "[G]oto [R]eferences" }, - { "n", "gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration" }, - { "n", "gi", vim.lsp.buf.implementation, "[G]oto [I]mplementation" }, - { "n", "gy", vim.lsp.buf.type_definition, "[G]oto T[y]pe Definition" }, + { "n", "ca", vim.lsp.buf.code_action, "[C]ode [A]ction" }, + { "n", "rn", vim.lsp.buf.rename, "[R]e[n]ame" }, + { "n", "gd", vim.lsp.buf.definition, "[G]oto [D]efinition" }, + { "n", "gr", vim.lsp.buf.references, "[G]oto [R]eferences" }, + { "n", "gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration" }, + { "n", "gi", vim.lsp.buf.implementation, "[G]oto [I]mplementation" }, + { "n", "gy", vim.lsp.buf.type_definition, "[G]oto T[y]pe Definition" }, } vim.api.nvim_create_autocmd("LspAttach", { @@ -220,7 +220,7 @@ local function setup_twilight() term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer) }, - context = 10, -- amount of lines we will try to show around the current line + context = 10, -- amount of lines we will try to show around the current line treesitter = true, -- use treesitter when available for the filetype -- treesitter is used to automatically expand the visible text, -- but you can further control the types of nodes that should always be fully expanded @@ -478,3 +478,12 @@ require("debugger") setup_lualine() setup_theme() setup_twilight() + + +vim.api.nvim_create_autocmd("CmdlineLeave", { + callback = function() + -- Automatically clear search highlight matching and redraw + vim.cmd("noh") + vim.cmd("redraw!") + end, +})