From da90b9ec1992cfbbb1fa05bac4c760040c4f9166 Mon Sep 17 00:00:00 2001 From: Joshua Finch Date: Sat, 10 Feb 2024 16:07:00 -0600 Subject: [PATCH] Changing away from the LSP rename function to built-in and potentially custom functions for find and replace in general rather than symbols only. Removing vimdoc from the TS install list. Adding a shortcut for clearing shortcut highlighting. Adding the buffer to the ex mode cmd autocomple sources. Changing the layout of telescope windows, partially as a test. --- init.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index db27add..d2a538f 100644 --- a/init.lua +++ b/init.lua @@ -275,6 +275,10 @@ keymap('n', 'gid', vim.cmd.Gdiff) keymap('n', 'eo', ':Lexplore', options) +keymap('n', '', ':noh', options) + +keymap('n', 'rn', ':%s///g<<', options) + -- Auto-recompile and load on init.lua file changes vim.api.nvim_create_autocmd({ 'BufWritePost' }, { pattern = { 'init.lua' }, @@ -313,7 +317,7 @@ local on_attach = function(client, bufnr) keymap('n', 'gi', vim.lsp.buf.implementation, bufopts) keymap('n', 'gs', vim.lsp.buf.signature_help, bufopts) keymap('n', 'D', vim.lsp.buf.type_definition, bufopts) - keymap('n', 'rn', vim.lsp.buf.rename, bufopts) + -- keymap('n', 'rn', vim.lsp.buf.rename, bufopts) keymap('n', 'gr', vim.lsp.buf.references, bufopts) keymap('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) @@ -400,6 +404,10 @@ if telescope and telescope_builtin then '.uproject$', -- Unreal Engine '-workspace$', }, + layout_strategy = 'vertical', + layout_config = { + height = 0.8 + }, results_title = false, prompt_prefix = '  ', selection_caret = '➤ ', @@ -439,7 +447,6 @@ if treesitter_configs then 'toml', 'tsx', 'typescript', - 'vimdoc', 'yaml', }, highlight = { @@ -525,7 +532,7 @@ if cmp then end }, completion = { - completeopt = 'menu,menuone,noinsert' -- TODO: Necessary copy of the default completeopt? + completeopt = 'menu,menuone,noinsert' }, experimental = { ghost_text = true, @@ -568,7 +575,8 @@ if cmp then cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ - { name = 'path' } + { name = 'path' }, + { name = 'buffer' } }, { { name = 'cmdline' } })