You've already forked dotfiles
fix: Moving the LSP configs out of the Mason file, using the new vim.lsp.config way of configuring LSPs, adding the 'after' config directory for LSP specific configs that override/extend those in the 'lsp' dir and fit with the new configuration way of NVIM 0.11+, moving shortcuts to lspconfig instead of Mason, removing the rename custom function in telescope and using the LSP based function.
This commit is contained in:
@@ -6,29 +6,6 @@ return {
|
||||
local action_state = require('telescope.actions.state')
|
||||
local fb_actions = telescope.extensions.file_browser.actions
|
||||
|
||||
local custom_actions = {}
|
||||
|
||||
function custom_actions.grep_multi_select(prompt_bufnr)
|
||||
local function get_table_size(t)
|
||||
local count = 0
|
||||
for _ in pairs(t) do
|
||||
count = count + 1
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
||||
local picker = action_state.get_current_picker(prompt_bufnr)
|
||||
local num_selections = get_table_size(picker:get_multi_selection())
|
||||
|
||||
if num_selections > 1 then
|
||||
actions.send_selected_to_qflist(prompt_bufnr)
|
||||
actions.open_qflist()
|
||||
print(action_state.get_current_picker(prompt_bufnr))
|
||||
else
|
||||
actions.file_edit(prompt_bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
opts.defaults = {
|
||||
file_ignore_patterns = {
|
||||
'.png$',
|
||||
@@ -39,10 +16,12 @@ return {
|
||||
'.webp$',
|
||||
'.uproject$',
|
||||
'-workspace$',
|
||||
'.git/',
|
||||
'.node_modules/',
|
||||
'node_modules',
|
||||
},
|
||||
layout_config = { prompt_position = 'top' },
|
||||
layout_strategy = 'horizontal',
|
||||
layout_config = { prompt_position = 'bottom' },
|
||||
layout_strategy = 'vertical',
|
||||
mappings = {
|
||||
i = {
|
||||
['<ESC>'] = actions.close,
|
||||
@@ -57,20 +36,12 @@ return {
|
||||
|
||||
opts.pickers = {
|
||||
diagnostics = {
|
||||
theme = 'ivy',
|
||||
-- theme = 'ivy',
|
||||
initial_mode = 'normal',
|
||||
layout_config = {
|
||||
preview_cutoff = 9999,
|
||||
},
|
||||
},
|
||||
grep_string = {
|
||||
initial_mode = 'normal',
|
||||
mappings = {
|
||||
['n'] = {
|
||||
['<cr>'] = custom_actions.grep_multi_select,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
opts.extensions = {
|
||||
@@ -101,12 +72,6 @@ return {
|
||||
require('telescope.builtin').find_files({
|
||||
no_ignore = false,
|
||||
hidden = true,
|
||||
file_ignore_patterns = {
|
||||
'.git/',
|
||||
'.node_modules/',
|
||||
'.webp',
|
||||
'.png',
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
@@ -158,12 +123,6 @@ return {
|
||||
require('telescope.builtin').lsp_dynamic_workspace_symbols()
|
||||
end
|
||||
},
|
||||
{
|
||||
'<leader>rn',
|
||||
function()
|
||||
require('telescope.builtin').grep_string({ search = vim.fn.expand('<cword>') })
|
||||
end
|
||||
},
|
||||
{
|
||||
';e',
|
||||
function()
|
||||
|
||||
Reference in New Issue
Block a user