Integrated LSP functionality into neovim configurations. Installed Mason to manage the installation of language servers. Used mason-lspconfig for the bridge between Mason and nvim-lspconfig. Also installed telescope-ui-select plugin to telescope to allow it to use telescope and it's windows for code actions.
44 lines
1.3 KiB
Lua
44 lines
1.3 KiB
Lua
return {
|
|
{
|
|
'nvim-telescope/telescope.nvim',
|
|
branch = '0.1.x',
|
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
|
config = function()
|
|
local builtin = require('telescope.builtin')
|
|
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
|
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
|
end
|
|
},
|
|
{
|
|
'nvim-telescope/telescope-ui-select.nvim',
|
|
config = function ()
|
|
-- This is your opts table
|
|
require("telescope").setup {
|
|
extensions = {
|
|
["ui-select"] = {
|
|
require("telescope.themes").get_dropdown {
|
|
-- even more opts
|
|
}
|
|
-- pseudo code / specification for writing custom displays, like the one
|
|
-- for "codeactions"
|
|
-- specific_opts = {
|
|
-- [kind] = {
|
|
-- make_indexed = function(items) -> indexed_items, width,
|
|
-- make_displayer = function(widths) -> displayer
|
|
-- make_display = function(displayer) -> function(e)
|
|
-- make_ordinal = function(e) -> string
|
|
-- },
|
|
-- -- for example to disable the custom builtin "codeactions" display
|
|
-- do the following
|
|
-- codeactions = false,
|
|
-- }
|
|
}
|
|
}
|
|
}
|
|
-- To get ui-select loaded and working with telescope, you need to call
|
|
-- load_extension, somewhere after setup function:
|
|
require("telescope").load_extension("ui-select")
|
|
end
|
|
}
|
|
}
|