add trouble

side note? why was I using feat and chore and etc?
This commit is contained in:
Zoty 2026-04-07 11:46:51 -03:00
parent af16bba334
commit d65c4083ba
Signed by: Zoty
SSH key fingerprint: SHA256:WsGEGivgl37t3Mth6uugXMOgMCTR7QolIepNbC+j/tA
9 changed files with 80 additions and 46 deletions

View file

@ -1,17 +1,17 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
@ -25,11 +25,11 @@ require("settings")
-- Setup lazy.nvim
require("lazy").setup({
spec = {
{ import = "plugins" },
},
checker = {
enabled = true,
notify = false,
},
spec = {
{ import = "plugins" },
},
checker = {
enabled = true,
notify = false,
},
})

View file

@ -13,6 +13,6 @@ return {
{ '<leader>fh', function() require('fzf-lua').help_tags() end, desc = 'Help tags' },
{ '<leader>fr', function() require('fzf-lua').oldfiles() end, desc = 'Recent files' },
{ '<leader>fd', function() require('fzf-lua').diagnostic_document() end, desc = 'Diagnostics' },
{ '<leader>fs', function() require('fzf-lua').lsp_document_symbosl() end, desc = 'LSP symbols' },
{ '<leader>fs', function() require('fzf-lua').lsp_document_symbols() end, desc = 'LSP symbols' },
},
}

View file

@ -3,7 +3,7 @@ return {
version = '^8',
lazy = false,
init = function()
vim.g.rustaceamvim = {
vim.g.rustaceanvim = {
server = {
settings = {
['rust-analyzer'] = {

View file

@ -2,5 +2,5 @@ return {
"ellisonleao/gruvbox.nvim",
priority = 1000,
config = true,
opts = ...,
opts = {},
}

View file

@ -5,4 +5,3 @@ return {
indent = { enable = true },
},
}

23
lua/plugins/trouble.lua Normal file
View file

@ -0,0 +1,23 @@
return {
'folke/trouble.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
opts = {
modes = {
diagnostics = {
mode = "diagnostics",
preview = {
type = "diagnostics",
relative = "win",
position = "right",
size = 0.4,
},
},
},
},
keys = {
{ '<leader>xx', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Diagnostics (workspace)' },
{ '<leader>xd', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', desc = 'Diagnostics (buffer)' },
{ ']t', function() require('trouble').next({ skip_groups = true, jump = true }) end, desc = 'Next trouble item' },
{ '[t', function() require('trouble').prev({ skip_groups = true, jump = true }) end, desc = 'Prev trouble item' },
}
}

View file

@ -1,33 +1,41 @@
-- Line numbers
vim.opt.number = true -- show absolute line numbers
vim.opt.relativenumber = true -- show relative line numbers
vim.opt.number = true -- show absolute line numbers
vim.opt.relativenumber = true -- show relative line numbers
-- Mouse & clipboard
vim.opt.mouse = "a" -- enable mouse support
vim.opt.clipboard = "unnamedplus" -- use system clipboard
-- Visual behavior
vim.opt.termguicolors = true -- enable true colors
vim.opt.cursorline = true -- highlight the current line
vim.opt.wrap = false -- do not wrap long lines
vim.opt.signcolumn = "yes" -- always show the sign number (LSP, git)
vim.opt.termguicolors = true -- enable true colors
vim.opt.cursorline = true -- highlight the current line
vim.opt.wrap = false -- do not wrap long lines
vim.opt.signcolumn = "yes" -- always show the sign number (LSP, git)
-- Scrolling
vim.opt.scrolloff = 8 -- keep space above/below cursor
vim.opt.sidescrolloff = 8 -- keep space left/right of cursor
-- Scrolling
vim.opt.scrolloff = 8 -- keep space above/below cursor
vim.opt.sidescrolloff = 8 -- keep space left/right of cursor
-- Indentation
vim.opt.expandtab = true -- use spaces instead of tabs
vim.opt.tabstop = 2 -- how many spaces a tab looks like
vim.opt.shiftwidth = 2 -- how many spaces when indenting
vim.opt.expandtab = true -- use spaces instead of tabs
vim.opt.tabstop = 2 -- how many spaces a tab looks like
vim.opt.shiftwidth = 2 -- how many spaces when indenting
-- Search
vim.opt.ignorecase = true -- case-insensitive search
vim.opt.smartcase = true -- case-sensitive if uppercase is used
vim.opt.incsearch = true -- show matches while typing
vim.opt.hlsearch = false -- do not keep matches highlighted
vim.opt.ignorecase = true -- case-insensitive search
vim.opt.smartcase = true -- case-sensitive if uppercase is used
vim.opt.incsearch = true -- show matches while typing
vim.opt.hlsearch = false -- do not keep matches highlighted
-- Window splits
vim.opt.splitbelow = true -- horizontal splits open below
vim.opt.splitright = true -- vertical splits open to the right
vim.opt.splitbelow = true -- horizontal splits open below
vim.opt.splitright = true -- vertical splits open to the right
-- Diagnostics
vim.diagnostic.config({
virtual_text = true, -- use virtual text for diagnostics
signs = true, -- use signs for diagnostics
underline = true, -- use underline for diagnostics
update_in_insert = false, -- update diagnostics in insert mod
severity_sort = true, -- sort diagnostics by severity
})