add devicons to config
This commit is contained in:
parent
5acf0f3f99
commit
1e9ffbf0a1
41
init.lua
41
init.lua
|
@ -219,7 +219,35 @@ require('lazy').setup({
|
||||||
'tpope/vim-surround',
|
'tpope/vim-surround',
|
||||||
|
|
||||||
-- Adds a whole history of changes made to a file.
|
-- Adds a whole history of changes made to a file.
|
||||||
'mbbill/undotree'
|
'mbbill/undotree',
|
||||||
|
|
||||||
|
-- Add nvim-web-devicons
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
|
||||||
|
-- A pretty list for showing diagnostics, references, telescope results, quickfix and
|
||||||
|
-- location lists to help you solve all the trouble your code is causing.
|
||||||
|
'folke/trouble.nvim',
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
-- settings without a patched font or icons
|
||||||
|
{
|
||||||
|
icons = false,
|
||||||
|
fold_open = "v", -- icon used for open folds
|
||||||
|
fold_closed = ">", -- icon used for closed folds
|
||||||
|
indent_lines = false, -- add an indent guide below the fold icons
|
||||||
|
signs = {
|
||||||
|
-- icons / text used for a diagnostic
|
||||||
|
error = "error",
|
||||||
|
warning = "warn",
|
||||||
|
hint = "hint",
|
||||||
|
information = "info"
|
||||||
|
},
|
||||||
|
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
||||||
|
@ -421,6 +449,17 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
|
||||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>xx", function() require("trouble").open() end, { desc = 'Open trouble' })
|
||||||
|
vim.keymap.set("n", "<leader>xw", function() require("trouble").open("workspace_diagnostics") end,
|
||||||
|
{ desc = 'Open workspace diagnostics' })
|
||||||
|
vim.keymap.set("n", "<leader>xd", function() require("trouble").open("document_diagnostics") end,
|
||||||
|
{ desc = 'Open document diagnostics' })
|
||||||
|
vim.keymap.set("n", "<leader>xq", function() require("trouble").open("quickfix") end,
|
||||||
|
{ desc = 'Open quickfix list diagnostics' })
|
||||||
|
vim.keymap.set("n", "<leader>xl", function() require("trouble").open("loclist") end,
|
||||||
|
{ desc = 'Open location list diagnostics' })
|
||||||
|
vim.keymap.set("n", "gR", function() require("trouble").open("lsp_references") end, { desc = '' })
|
||||||
|
|
||||||
-- [[ Configure LSP ]]
|
-- [[ Configure LSP ]]
|
||||||
-- This function gets run when an LSP connects to a particular buffer.
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
|
|
Loading…
Reference in New Issue