diff options
| author | Aotrix <[email protected]> | 2025-08-04 23:07:18 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2025-08-04 23:07:18 +0200 |
| commit | d9d3a6a6ab130c84d9d93bd608659d8212e6915a (patch) | |
| tree | 31eb74b2f0b3daa9760e3bec3efc838f679b848e /lua/aotrix | |
| parent | 2285254f6e48fa0572e85f3f0f3a9f547f793c58 (diff) | |
removed grt key mapping
Diffstat (limited to 'lua/aotrix')
| -rw-r--r-- | lua/aotrix/plugins/telescope.lua | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lua/aotrix/plugins/telescope.lua b/lua/aotrix/plugins/telescope.lua index d85f3d6..7fda7c9 100644 --- a/lua/aotrix/plugins/telescope.lua +++ b/lua/aotrix/plugins/telescope.lua @@ -5,7 +5,7 @@ return { dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-live-grep-args.nvim', 'nvim-telescope/telescope-file-browser.nvim', - {'nvim-telescope/telescope-fzf-native.nvim', build = 'make'}, + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, 'nvim-telescope/telescope-ui-select.nvim' }, @@ -26,7 +26,7 @@ return { }, extensions = { fzf = {}, - ['ui-select'] = {require('telescope.themes').get_dropdown()} + ['ui-select'] = { require('telescope.themes').get_dropdown() } } }) @@ -37,19 +37,20 @@ return { require("telescope").extensions.file_browser.file_browser() end) vim.keymap.set("n", "<leader>pf", - function() - require("telescope.builtin").find_files() - end) + function() + require("telescope.builtin").find_files() + end) require('aotrix.multigrep').setup() vim.keymap.del("n", "gri") vim.keymap.del("n", "grr") vim.keymap.del("n", "grn") - vim.keymap.del({"n", "x"}, "gra") + vim.keymap.del("n", "grt") + vim.keymap.del({ "n", "x" }, "gra") vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('lsp-attach', {clear = true}), + group = vim.api.nvim_create_augroup('lsp-attach', { clear = true }), callback = function(event) -- NOTE: Remember that Lua is a real programming language, and as such it is possible -- to define small helper and utility functions so you don't have to repeat yourself. @@ -59,7 +60,7 @@ return { local map = function(keys, func, desc, mode) mode = mode or 'n' vim.keymap.set(mode, keys, func, - {buffer = event.buf, desc = 'LSP: ' .. desc}) + { buffer = event.buf, desc = 'LSP: ' .. desc }) end -- Jump to the definition of the word under your cursor. @@ -103,7 +104,7 @@ return { -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', - {'n', 'x'}) + { 'n', 'x' }) -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. @@ -118,7 +119,7 @@ return { if vim.fn.has 'nvim-0.11' == 1 then return client:supports_method(method, bufnr) else - return client.supports_method(method, {bufnr = bufnr}) + return client.supports_method(method, { bufnr = bufnr }) end end @@ -129,28 +130,28 @@ return { -- When you move your cursor, the highlights will be cleared (the second autocommand). local client = vim.lsp.get_client_by_id(event.data.client_id) if client and client_supports_method(client, vim.lsp.protocol - .Methods - .textDocument_documentHighlight, - event.buf) then + .Methods + .textDocument_documentHighlight, + event.buf) then local highlight_augroup = vim.api.nvim_create_augroup('lsp-highlight', - {clear = false}) - vim.api.nvim_create_autocmd({'CursorHold', 'CursorHoldI'}, { + { clear = false }) + vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, group = highlight_augroup, callback = vim.lsp.buf.document_highlight }) - vim.api.nvim_create_autocmd({'CursorMoved', 'CursorMovedI'}, - { - buffer = event.buf, - group = highlight_augroup, - callback = vim.lsp.buf.clear_references - }) + vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, + { + buffer = event.buf, + group = highlight_augroup, + callback = vim.lsp.buf.clear_references + }) vim.api.nvim_create_autocmd('LspDetach', { group = vim.api.nvim_create_augroup('lsp-detach', - {clear = true}), + { clear = true }), callback = function(event2) vim.lsp.buf.clear_references() vim.api.nvim_clear_autocmds { @@ -167,8 +168,8 @@ return { -- This may be unwanted, since they displace some of your code if client and client_supports_method(client, vim.lsp.protocol.Methods - .textDocument_inlayHint, - event.buf) then + .textDocument_inlayHint, + event.buf) then map('<leader>th', function() vim.lsp.inlay_hint.enable( not vim.lsp.inlay_hint.is_enabled { @@ -178,6 +179,5 @@ return { end end }) - end } |
