devicons true

This commit is contained in:
Vitordb 2024-09-13 10:27:44 -03:00
parent c0a23b611c
commit 2640b6e649
1 changed files with 52 additions and 19 deletions

View File

@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true
-- [[ Setting options ]]
-- See `:help vim.opt`
@ -357,6 +357,7 @@ require('lazy').setup({
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
},
config = function()
local actions = require 'telescope.actions'
-- Telescope is a fuzzy finder that comes with a lot of different things that
-- it can fuzzy find! It's more than just a "file finder", it can search
-- many different aspects of Neovim, your workspace, LSP, and more!
@ -379,15 +380,17 @@ require('lazy').setup({
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup {
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
-- defaults = {
-- mappings = {
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
-- },
-- },
-- pickers = {}
defaults = {
mappings = {
i = {
-- Navegar com Ctrl+j e Ctrl+k
['<C-j>'] = actions.move_selection_next,
['<C-k>'] = actions.move_selection_previous,
-- Confirmar seleção com Enter
['<CR>'] = actions.select_default,
},
},
},
extensions = {
['ui-select'] = {
require('telescope.themes').get_dropdown(),
@ -632,6 +635,30 @@ require('lazy').setup({
},
},
},
gopls = {
-- Comando para iniciar o gopls
cmd = { 'gopls' },
-- Arquivos que o gopls deve processar
filetypes = { 'go', 'gomod' },
-- Definindo as capacidades do LSP (com suporte a snippets, por exemplo)
capabilities = capabilities,
-- Configurações específicas do gopls
settings = {
gopls = {
analyses = {
unusedparams = true, -- Analisar parâmetros não utilizados
},
staticcheck = true, -- Habilitar verificações estáticas
},
},
-- Configurações de root directory
root_dir = require('lspconfig/util').root_pattern('go.work', 'go.mod', '.git'),
},
}
-- Ensure the servers and tools above are installed
@ -764,19 +791,25 @@ require('lazy').setup({
-- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert {
-- Select the [n]ext item
['<C-n>'] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
['<C-p>'] = cmp.mapping.select_prev_item(),
-- ['<C-n>'] = cmp.mapping.select_next_item(),
-- -- Select the [p]revious item
-- ['<C-p>'] = cmp.mapping.select_prev_item(),
--
-- -- Scroll the documentation window [b]ack / [f]orward
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
--
-- -- Accept ([y]es) the completion.
-- -- This will auto-import if your LSP supports it.
-- -- This will expand snippets if the LSP sent a snippet.
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
-- Scroll the documentation window [b]ack / [f]orward
['<C-j>'] = cmp.mapping.select_next_item(), -- Usar Ctrl + j para navegar para baixo
['<C-k>'] = cmp.mapping.select_prev_item(), -- Usar Ctrl + k para navegar para cima
['<CR>'] = cmp.mapping.confirm { select = true }, -- Usar Enter para confirmar seleção
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
-- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
['<C-y>'] = cmp.mapping.confirm { select = true },
-- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines
--['<CR>'] = cmp.mapping.confirm { select = true },