More vim.lsp.*, less telescope
- Id
- a0be66ff8eca94930eeda7fbdd3c22a2537dfd90
- Author
- Caio
- Commit time
- 2022-08-20T10:20:15+02:00
Modified config/nvim/lua/config/lsp.lua
local function map(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local opts = { silent = true, noremap = true }
- map('n', 'gd', '<cmd>Telescope lsp_definitions<CR>', opts)
- map('n', 'gD', '<cmd>Telescope lsp_implementations<CR>', opts)
+ map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
+ map('n', 'gD', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
map('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
- map('n', 'gr', '<cmd>Telescope lsp_references<CR>', opts)
- map('n', 'ac', '<cmd>Telescope lsp_code_actions<CR>', opts)
- map('n', '<leader>t', '<cmd>Telescope lsp_workspace_symbols<CR>', opts)
- map('n', '<leader>T', '<cmd>Telescope lsp_document_symbols<CR>', opts)
+ map('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
+ map('n', 'ac', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
+ map('n', '<leader>t', '<cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
+ map('n', '<leader>T', '<cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
local cmd = vim.api.nvim_command
-- Format right before saving
Modified config/nvim/lua/config/telescope.lua
theme = "ivy",
previewer = false,
},
- lsp_references = {
- theme = "cursor",
- previewer = false,
- },
- lsp_code_actions = {
- theme = "cursor",
- },
buffers = {
theme = "dropdown",
previewer = false,