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.
This commit is contained in:
Finch 2024-02-10 16:07:00 -06:00
parent ef54f297ee
commit da90b9ec19

View File

@ -275,6 +275,10 @@ keymap('n', '<leader>gid', vim.cmd.Gdiff)
keymap('n', '<leader>eo', ':Lexplore<CR>', options) keymap('n', '<leader>eo', ':Lexplore<CR>', options)
keymap('n', '<a-c>', ':noh<CR>', options)
keymap('n', '<leader>rn', ':%s///g<<', options)
-- Auto-recompile and load on init.lua file changes -- Auto-recompile and load on init.lua file changes
vim.api.nvim_create_autocmd({ 'BufWritePost' }, { vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
pattern = { 'init.lua' }, pattern = { 'init.lua' },
@ -313,7 +317,7 @@ local on_attach = function(client, bufnr)
keymap('n', 'gi', vim.lsp.buf.implementation, bufopts) keymap('n', 'gi', vim.lsp.buf.implementation, bufopts)
keymap('n', 'gs', vim.lsp.buf.signature_help, bufopts) keymap('n', 'gs', vim.lsp.buf.signature_help, bufopts)
keymap('n', '<leader>D', vim.lsp.buf.type_definition, bufopts) keymap('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
keymap('n', '<leader>rn', vim.lsp.buf.rename, bufopts) -- keymap('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
keymap('n', 'gr', vim.lsp.buf.references, bufopts) keymap('n', 'gr', vim.lsp.buf.references, bufopts)
keymap('n', '<leader><leader>f', function() vim.lsp.buf.format { async = true } end, bufopts) keymap('n', '<leader><leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
@ -400,6 +404,10 @@ if telescope and telescope_builtin then
'.uproject$', -- Unreal Engine '.uproject$', -- Unreal Engine
'-workspace$', '-workspace$',
}, },
layout_strategy = 'vertical',
layout_config = {
height = 0.8
},
results_title = false, results_title = false,
prompt_prefix = '', prompt_prefix = '',
selection_caret = '', selection_caret = '',
@ -439,7 +447,6 @@ if treesitter_configs then
'toml', 'toml',
'tsx', 'tsx',
'typescript', 'typescript',
'vimdoc',
'yaml', 'yaml',
}, },
highlight = { highlight = {
@ -525,7 +532,7 @@ if cmp then
end end
}, },
completion = { completion = {
completeopt = 'menu,menuone,noinsert' -- TODO: Necessary copy of the default completeopt? completeopt = 'menu,menuone,noinsert'
}, },
experimental = { experimental = {
ghost_text = true, ghost_text = true,
@ -568,7 +575,8 @@ if cmp then
cmp.setup.cmdline(':', { cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'path' } { name = 'path' },
{ name = 'buffer' }
}, { }, {
{ name = 'cmdline' } { name = 'cmdline' }
}) })