Adds dashboard and telescope-ui-select

This commit is contained in:
Marcelo Canaparro 2024-01-06 16:10:06 +00:00
parent 0ebf26b49c
commit dbf9c5783f
7 changed files with 229 additions and 192 deletions

View file

@ -0,0 +1,24 @@
return {
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
-- config = {
-- shortcut = {
-- -- action can be a function type
-- { desc = string, group = 'highlight group', key = 'shortcut key', action = 'action when you press key' },
-- },
-- packages = { enable = true }, -- show how many plugins neovim loaded
-- -- limit how many projects list, action when you press key or enter it will run this action.
-- -- action can be a functino type, e.g.
-- -- action = func(path) vim.cmd('Telescope find_files cwd=' .. path) end
-- project = { enable = true, limit = 8, icon = 'your icon', label = '', action = 'Telescope find_files cwd=' },
-- mru = { limit = 10, icon = 'your icon', label = '', cwd_only = false },
-- footer = {}, -- footer
-- }
}
end,
dependencies = { { 'nvim-tree/nvim-web-devicons' } }
}
}

View file

@ -1,23 +0,0 @@
return {
{
"williamboman/mason.nvim",
config = function ()
require('mason').setup()
end
},
{
'williamboman/mason-lspconfig.nvim',
config = function()
require("mason-lspconfig").setup {
ensure_installed = { "lua_ls", "pyright" },
}
end
},
{
"neovim/nvim-lspconfig",
config = function()
local lspconfig = require('lspconfig')
lspconfig.lua_ls.setup({})
end
}
}

View file

@ -0,0 +1,35 @@
return {
{
'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
}
}

View file

@ -47,8 +47,8 @@ vim.o.completeopt = 'menuone,noselect'
vim.o.termguicolors = true
-- Number of spaces that a <Tab> in the file counts for
vim.opt.tabstop = 4
-- Number of spaces to use for each step of (auto)indent
vim.opt.shiftwidth = 4
-- Use spaces instead of tabs
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true

View file

@ -11,38 +11,38 @@ return { -- NOTE: First, some plugins that don't require any configuration
-- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below.
-- {
-- -- LSP Configuration & Plugins
-- 'neovim/nvim-lspconfig',
-- dependencies = {
-- -- Automatically install LSPs to stdpath for neovim
-- { 'williamboman/mason.nvim', config = true },
-- 'williamboman/mason-lspconfig.nvim',
--
-- -- Useful status updates for LSP
-- -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
-- { 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
--
-- -- Additional lua configuration, makes nvim stuff amazing!
-- 'folke/neodev.nvim',
-- },
-- },
{
-- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs to stdpath for neovim
{ 'williamboman/mason.nvim', config = true },
'williamboman/mason-lspconfig.nvim',
-- {
-- -- Autocompletion
-- 'hrsh7th/nvim-cmp',
-- dependencies = {
-- -- Snippet Engine & its associated nvim-cmp source
-- 'L3MON4D3/LuaSnip',
-- 'saadparwaiz1/cmp_luasnip',
--
-- -- Adds LSP completion capabilities
-- 'hrsh7th/cmp-nvim-lsp',
--
-- -- Adds a number of user-friendly snippets
-- 'rafamadriz/friendly-snippets',
-- },
-- },
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
-- Additional lua configuration, makes nvim stuff amazing!
'folke/neodev.nvim',
},
},
{
-- Autocompletion
'hrsh7th/nvim-cmp',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
-- Adds LSP completion capabilities
'hrsh7th/cmp-nvim-lsp',
-- Adds a number of user-friendly snippets
'rafamadriz/friendly-snippets',
},
},
-- Useful plugin to show you pending keybinds.
{ 'folke/which-key.nvim', opts = {} },