From 00e032f378490fde7d7d1d95fbc144f63bbaf366 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Sat, 25 Nov 2023 02:23:27 -0500 Subject: [PATCH] modofied configs --- .DS_Store | Bin .github/ISSUE_TEMPLATE/bug_report.md | 0 .gitignore | 0 .stylua.toml | 0 LICENSE.md | 0 README.md | 0 doc/kickstart.txt | 0 doc/tags | 0 init.lua | 0 lua/config/mappings.lua | 23 ++++++++++++++++++++++- lua/config/options.lua | 0 lua/config/themes.lua | 0 lua/config/utils.lua | 0 lua/custom/plugins/autopairs.lua | 0 lua/custom/plugins/cmp.lua | 0 lua/custom/plugins/comments.lua | 0 lua/custom/plugins/formatting.lua | 0 lua/custom/plugins/fugitive.lua | 0 lua/custom/plugins/gitsigns.lua | 0 lua/custom/plugins/harpoon.lua | 0 lua/custom/plugins/indent.lua | 0 lua/custom/plugins/init.lua | 0 lua/custom/plugins/linting.lua | 0 lua/custom/plugins/lsp-config.lua | 25 +++++++++++++++---------- lua/custom/plugins/lualine.lua | 0 lua/custom/plugins/monokai.lua | 0 lua/custom/plugins/telescope-undo.lua | 0 lua/custom/plugins/telescope.lua | 0 lua/custom/plugins/tree-sitter.lua | 0 lua/custom/plugins/undotree.lua | 0 lua/custom/plugins/venv-selector.lua | 0 lua/custom/plugins/which-key.lua | 0 lua/kickstart/plugins/autoformat.lua | 0 lua/kickstart/plugins/debug.lua | 0 34 files changed, 37 insertions(+), 11 deletions(-) mode change 100644 => 100755 .DS_Store mode change 100644 => 100755 .github/ISSUE_TEMPLATE/bug_report.md mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .stylua.toml mode change 100644 => 100755 LICENSE.md mode change 100644 => 100755 README.md mode change 100644 => 100755 doc/kickstart.txt mode change 100644 => 100755 doc/tags mode change 100644 => 100755 init.lua mode change 100644 => 100755 lua/config/mappings.lua mode change 100644 => 100755 lua/config/options.lua mode change 100644 => 100755 lua/config/themes.lua mode change 100644 => 100755 lua/config/utils.lua mode change 100644 => 100755 lua/custom/plugins/autopairs.lua mode change 100644 => 100755 lua/custom/plugins/cmp.lua mode change 100644 => 100755 lua/custom/plugins/comments.lua mode change 100644 => 100755 lua/custom/plugins/formatting.lua mode change 100644 => 100755 lua/custom/plugins/fugitive.lua mode change 100644 => 100755 lua/custom/plugins/gitsigns.lua mode change 100644 => 100755 lua/custom/plugins/harpoon.lua mode change 100644 => 100755 lua/custom/plugins/indent.lua mode change 100644 => 100755 lua/custom/plugins/init.lua mode change 100644 => 100755 lua/custom/plugins/linting.lua mode change 100644 => 100755 lua/custom/plugins/lsp-config.lua mode change 100644 => 100755 lua/custom/plugins/lualine.lua mode change 100644 => 100755 lua/custom/plugins/monokai.lua mode change 100644 => 100755 lua/custom/plugins/telescope-undo.lua mode change 100644 => 100755 lua/custom/plugins/telescope.lua mode change 100644 => 100755 lua/custom/plugins/tree-sitter.lua mode change 100644 => 100755 lua/custom/plugins/undotree.lua mode change 100644 => 100755 lua/custom/plugins/venv-selector.lua mode change 100644 => 100755 lua/custom/plugins/which-key.lua mode change 100644 => 100755 lua/kickstart/plugins/autoformat.lua mode change 100644 => 100755 lua/kickstart/plugins/debug.lua diff --git a/.DS_Store b/.DS_Store old mode 100644 new mode 100755 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.stylua.toml b/.stylua.toml old mode 100644 new mode 100755 diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/doc/kickstart.txt b/doc/kickstart.txt old mode 100644 new mode 100755 diff --git a/doc/tags b/doc/tags old mode 100644 new mode 100755 diff --git a/init.lua b/init.lua old mode 100644 new mode 100755 diff --git a/lua/config/mappings.lua b/lua/config/mappings.lua old mode 100644 new mode 100755 index 88c3b116..ce8f7be7 --- a/lua/config/mappings.lua +++ b/lua/config/mappings.lua @@ -54,6 +54,7 @@ vim.keymap.set('n', '/', function() winblend = 10, previewer = false, }) + -- require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes')) end, { desc = '[/] Fuzzily search in current buffer' }) vim.keymap.set('n', 'gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' }) @@ -72,7 +73,27 @@ vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) + +-- Open the diagnostics location list +vim.keymap.set('n', 'q', function() + vim.diagnostic.setloclist() + vim.cmd('lopen') +end, { + noremap = true, + silent = true, + expr = false, + desc = 'Open the diagnostics location list' +}) + +-- Close the diagnostics location list +vim.keymap.set('n', 'qq', function() + vim.cmd('lclose') +end, { + noremap = true, + silent = true, + expr = false, + desc = 'Close the diagnostics location list' +}) -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` diff --git a/lua/config/options.lua b/lua/config/options.lua old mode 100644 new mode 100755 diff --git a/lua/config/themes.lua b/lua/config/themes.lua old mode 100644 new mode 100755 diff --git a/lua/config/utils.lua b/lua/config/utils.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/autopairs.lua b/lua/custom/plugins/autopairs.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/cmp.lua b/lua/custom/plugins/cmp.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/comments.lua b/lua/custom/plugins/comments.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/formatting.lua b/lua/custom/plugins/formatting.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/fugitive.lua b/lua/custom/plugins/fugitive.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/gitsigns.lua b/lua/custom/plugins/gitsigns.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/indent.lua b/lua/custom/plugins/indent.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/linting.lua b/lua/custom/plugins/linting.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/lsp-config.lua b/lua/custom/plugins/lsp-config.lua old mode 100644 new mode 100755 index d1b5b470..21b6feda --- a/lua/custom/plugins/lsp-config.lua +++ b/lua/custom/plugins/lsp-config.lua @@ -36,7 +36,12 @@ return { end nmap('rn', vim.lsp.buf.rename, '[R]e[n]ame') - nmap('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') + nmap('ca', function() + vim.lsp.buf.code_action(require('telescope.themes').get_dropdown { + winblend = 10, + previewer = false, + }) + end, '[C]ode [A]ction') nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') @@ -58,17 +63,17 @@ return { end, '[W]orkspace [L]ist Folders') -- Create a command `:Format` local to the LSP buffer - vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) - vim.lsp.buf.format() - end, { desc = 'Format current buffer with LSP and lint' }) + -- vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) + -- vim.lsp.buf.format() + -- end, { desc = 'Format current buffer with LSP and lint' }) -- Enable auto-formatting on save - -- vim.api.nvim_command([[ - -- augroup AutoFormatOnSave - -- autocmd! - -- autocmd BufWritePre * :Format - -- augroup END - -- ]]) + vim.api.nvim_command([[ + augroup AutoFormatOnSave + autocmd! + autocmd BufWritePre * :Format + augroup END + ]]) end -- Setup neovim lua configuration diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/monokai.lua b/lua/custom/plugins/monokai.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/telescope-undo.lua b/lua/custom/plugins/telescope-undo.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/telescope.lua b/lua/custom/plugins/telescope.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/tree-sitter.lua b/lua/custom/plugins/tree-sitter.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/undotree.lua b/lua/custom/plugins/undotree.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/venv-selector.lua b/lua/custom/plugins/venv-selector.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/which-key.lua b/lua/custom/plugins/which-key.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua old mode 100644 new mode 100755