Move Telescope keybindings from LSP's
These should global keybindings
This commit is contained in:
parent
6ebd97fe3f
commit
e15156ecd7
2 changed files with 9 additions and 8 deletions
|
|
@ -1 +1,7 @@
|
|||
vim.api.nvim_set_keymap('n', '<C-E>', '<cmd>:NERDTreeToggle<CR>', {noremap=true, silent=true})
|
||||
local opts = {noremap=true, silent=true}
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<C-E>', '<cmd>:NERDTreeToggle<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', 'ff', '<cmd>lua require("telescope.builtin").find_files()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', 'fg', '<cmd>lua require("telescope.builtin").live_grep()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', 'fb', '<cmd>lua require("telescope.builtin").buffers()<CR>', opts)
|
||||
vim.api.nvim_set_keymap('n', 'fh', '<cmd>lua require("telescope.builtin").help_tags()<CR>', opts)
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ local on_attach = function(client, bufnr)
|
|||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
-- enable completion triggered by <c-x><c-o>
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
-- mappings
|
||||
local opts = { noremap=true, silent=true }
|
||||
|
||||
--see `:help vim.lsp.*` for documentation on any of the below functions
|
||||
|
|
@ -20,11 +20,6 @@ local on_attach = function(client, bufnr)
|
|||
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
|
||||
buf_set_keymap('n', 'ff', '<cmd>lua require("telescope.builtin").find_files()<CR>', opts)
|
||||
buf_set_keymap('n', 'fg', '<cmd>lua require("telescope.builtin").live_grep()<CR>', opts)
|
||||
buf_set_keymap('n', 'fb', '<cmd>lua require("telescope.builtin").buffers()<CR>', opts)
|
||||
buf_set_keymap('n', 'fh', '<cmd>lua require("telescope.builtin").help_tags()<CR>', opts)
|
||||
end
|
||||
|
||||
local nvim_lsp = require('lspconfig')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue