Compare commits

..

No commits in common. "a6630c6eb0634e1baffe6f44524c3d97ea42ea35" and "8597fd488f19ddc288efa9e720fc570013b122b7" have entirely different histories.

2 changed files with 28 additions and 26 deletions

View file

@ -44,7 +44,6 @@ function KEYBINDS:set_global_keys(opts)
vim.keymap.set('n', '<M-t>', ':tabnew<CR>', opts) -- fallback for windows
vim.keymap.set('n', '<C-t>', ':Neotree toggle<CR>', {noremap=true})
vim.keymap.set('n', '<C-S-t>', ':Neotree toggle source=symbolmap right<CR>', {noremap=true})
vim.keymap.set('n', '<M-S-t>', ':Neotree toggle source=symbolmap right<CR>', {noremap=true})
vim.keymap.set('n', '<C-PageUp>', ':Neotree toggle source=diagnostics bottom<CR>', opts)
-- vim.keymap.set('n', '<C-h>', vim.cmd.UndotreeToggle, {noremap=true})
-- Esc goes back to normal mode in terminal
@ -85,7 +84,6 @@ function KEYBINDS:set_lsp_keys(opts)
vim.keymap.set('n', '<leader>r', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<leader>h', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<leader>f', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<M-q>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<C-Space>', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<C-x>', vim.lsp.buf.hover, opts)
vim.keymap.set('n', '<leader>H', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end)
@ -118,28 +116,43 @@ end
function KEYBINDS:set_telescope_keys(opts)
local telescope = require('telescope.builtin')
local theme = require('telescope.themes')
vim.keymap.set('n', '<leader>p', telescope.find_files, opts)
vim.keymap.set('n', '<leader>', wrap(telescope.lsp_dynamic_workspace_symbols, {layout_strategy = 'vertical'}), opts)
vim.keymap.set('n', '<leader>/', wrap(telescope.live_grep, {layout_strategy = 'vertical'}), opts)
vim.keymap.set('n', '<leader>]', wrap(telescope.lsp_references, theme.get_dropdown()), opts)
vim.keymap.set('n', '<leader>r', wrap(telescope.lsp_references, theme.get_dropdown()), opts) -- overrule lsp bind
vim.keymap.set('n', '<leader>;', telescope.git_bcommits, opts)
-- File navigation
vim.keymap.set('n', '<leader><leader>p', wrap(telescope.oldfiles, {layout_strategy = 'vertical' }), opts)
vim.keymap.set('n', '<leader>p', telescope.find_files, opts)
vim.keymap.set('n', '<M-f>', telescope.find_files, opts) -- fallback for windows
vim.keymap.set('n', '<C-,>', wrap(telescope.live_grep, {layout_strategy = 'vertical'}), opts)
vim.keymap.set('n', '<M-,>', wrap(telescope.live_grep, {layout_strategy = 'vertical'}), opts) -- fallback for windows
vim.keymap.set('n', '<M-]>', wrap(telescope.lsp_references, theme.get_cursor()), opts)
vim.keymap.set('n', '<M-[>', wrap(telescope.jumplist, theme.get_dropdown()), opts)
vim.keymap.set('n', '<C-;>', telescope.git_bcommits, opts)
vim.keymap.set('n', '<M-;>', telescope.git_bcommits, opts) -- fallback for windows
vim.keymap.set('n', '<M-=>', wrap(telescope.registers, theme.get_dropdown()), opts) -- fallback for windows
-- Marks and buffers with telescope
vim.keymap.set('n', '<C-End>', telescope.buffers, opts)
vim.keymap.set('n', '<C-\'>', wrap(telescope.marks, theme.get_dropdown()), opts)
vim.keymap.set('n', '<M-\'>', wrap(telescope.marks, theme.get_dropdown()), opts) -- fallback for windows
vim.keymap.set('n', '<C-/>', wrap(telescope.current_buffer_fuzzy_find, {layout_strategy = 'vertical'}), opts)
vim.keymap.set('n', '<M-/>', wrap(telescope.current_buffer_fuzzy_find, {layout_strategy = 'vertical'}), opts) -- fallback for windows
-- Symbols with telescope
vim.keymap.set('n', '<C-\\>', telescope.lsp_document_symbols, opts)
vim.keymap.set('n', '<leader>/', telescope.lsp_document_symbols, opts)
vim.keymap.set('n', '<leader>s', wrap(telescope.lsp_dynamic_workspace_symbols, {layout_strategy = 'vertical'}), opts)
vim.keymap.set('n', '<C-|>', wrap(telescope.lsp_dynamic_workspace_symbols, {layout_strategy = 'vertical'}), opts)
vim.keymap.set('n', '<M-|>', wrap(telescope.lsp_dynamic_workspace_symbols, {layout_strategy = 'vertical'}), opts)
-- Resule last
vim.keymap.set('n', '<C-CR>', telescope.resume, opts)
vim.keymap.set('n', '<M-CR>', telescope.resume, opts)
-- Error list with telescope
vim.keymap.set('n', '<C-PageDown>', wrap(telescope.diagnostics, theme.get_ivy({bufnr=0})), opts)
if not vim.g.disable_legacy_keybinds then
-- File navigation
vim.keymap.set('n', '<leader>|', wrap(telescope.oldfiles, {layout_strategy = 'vertical' }), opts)
vim.keymap.set('n', '<C-ESC>', wrap(telescope.oldfiles, {layout_strategy = 'vertical' }), opts)
vim.keymap.set('n', '<M-!>', wrap(telescope.oldfiles, {layout_strategy = 'vertical' }), opts) -- fallback for windows... even <M-Esc> is used
vim.keymap.set('n', '<C-f>', telescope.find_files, opts)
vim.keymap.set('n', '<M-f>', telescope.find_files, opts) -- fallback for windows
vim.keymap.set('n', '<C-,>', wrap(telescope.live_grep, {layout_strategy = 'vertical'}), opts)
vim.keymap.set('n', '<M-,>', wrap(telescope.live_grep, {layout_strategy = 'vertical'}), opts) -- fallback for windows
vim.keymap.set('n', '<M-]>', wrap(telescope.lsp_references, theme.get_cursor()), opts)
vim.keymap.set('n', '<M-[>', wrap(telescope.jumplist, theme.get_dropdown()), opts)
vim.keymap.set('n', '<C-;>', telescope.git_bcommits, opts)
vim.keymap.set('n', '<M-;>', telescope.git_bcommits, opts) -- fallback for windows

View file

@ -77,23 +77,12 @@ return {
config = function()
require('nvim-treesitter.configs').setup({
highlight = { enable = true },
indent = { enable = true },
})
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
end
},
{
'nvim-treesitter/nvim-treesitter',
config = function ()
require('treesitter-context').setup({
multiwindow = true,
min_window_height = 10,
})
end
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",