diff --git a/init.lua b/init.lua index 87e0249..29eda94 100644 --- a/init.lua +++ b/init.lua @@ -22,7 +22,7 @@ vim.api.nvim_create_autocmd('User', { require 'config.mappings' require 'config.autocmd' require 'nvim-treesitter' - require 'noice' + require 'dressing' end, }) diff --git a/lua/config/mappings.lua b/lua/config/mappings.lua index 2a4b64f..dab97ee 100644 --- a/lua/config/mappings.lua +++ b/lua/config/mappings.lua @@ -35,10 +35,10 @@ keymap('v', 'r', ':s///gI', { noremap = true }) keymap('n', 'D', '"_d', { noremap = true }) keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opt) -keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opt) +keymap('n', 'gd', 'TroubleToggle lsp_definitions', opt) keymap('n', 'gr', 'TroubleToggle lsp_references', opt) keymap('n', '', 'lua vim.lsp.buf.hover()', opt) -keymap('n', 'gI', 'lua vim.lsp.buf.implementation()', opt) +keymap('n', 'gI', 'TroubleToggle lsp_implementations', opt) keymap('n', 'gl', 'lua vim.diagnostic.open_float()', opt) keymap('n', 'lf', 'lua vim.lsp.buf.format { async = true }', opt) keymap('n', 'li', 'LspInfo', opt) diff --git a/lua/config/settings.lua b/lua/config/settings.lua index 37f0d41..c5727d5 100644 --- a/lua/config/settings.lua +++ b/lua/config/settings.lua @@ -18,6 +18,7 @@ opt.clipboard:prepend { 'unnamedplus' } opt.ignorecase = true opt.smartcase = true opt.sessionoptions = 'folds' +opt.foldlevelstart = 1 opt.number = true opt.shortmess:append('I', 'W', 's') opt.iskeyword:prepend { '-' } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index dfaebc5..01cf114 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -93,6 +93,7 @@ return { }, sources = { { name = 'nvim_lsp' }, + { name = 'neorg' }, { name = 'snippy' }, { name = 'path' }, { name = 'buffer' }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7d0ba06..70ba45c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,8 +1,14 @@ return { + { + 'stevearc/dressing.nvim', + opts = {}, + -- lazy = false, + }, + 'MunifTanjim/nui.nvim', 'folke/which-key.nvim', 'nvim-lua/plenary.nvim', -- 'mfussenegger/nvim-jdtls', - -- 'simrat39/rust-tools.nvim', + 'simrat39/rust-tools.nvim', { 'rush-rs/tree-sitter-asm', ft = 'asm' }, { 'jghauser/mkdir.nvim', lazy = false }, { @@ -345,13 +351,18 @@ return { config = function() require("neorg").setup { load = { + ["core.integrations.treesitter"] = {}, ["core.defaults"] = {}, -- Loads default behaviour ["core.concealer"] = {}, -- Adds pretty icons to your documents + ["core.export"] = {}, + ["core.ui"] = {}, + ["core.completion"] = { config = { engine = "nvim-cmp" } }, ["core.dirman"] = { -- Manages Neorg workspaces config = { workspaces = { notes = "~/notes", }, + default_workspace = "notes", }, }, }, diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua deleted file mode 100644 index ddcde3c..0000000 --- a/lua/plugins/noice.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - "folke/noice.nvim", - -- event = "VeryLazy", - opts = { - lsp = { - -- override markdown rendering so that **cmp** and other plugins use **Treesitter** - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, - }, - -- signature = { - -- enabled = false, - -- }, - -- hover = { - -- enabled = false, - -- }, - }, - -- you can enable a preset for easier configuration - presets = { - bottom_search = true, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - }, - dependencies = { - "MunifTanjim/nui.nvim", - } -} diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index 092b0b5..47db689 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -33,14 +33,14 @@ return { open_folds = { "zR", "zr" }, -- open all folds toggle_fold = { "zA", "za" }, -- toggle fold of current file previous = "k", -- previous item - next = "j" -- next item + next = "j" -- next item }, indent_lines = true, -- add an indent guide below the fold icons - auto_open = false, -- automatically open the list when you have diagnostics - auto_close = false, -- automatically close the list when you have no diagnostics + auto_open = false, -- automatically open the list when you have diagnostics + auto_close = true, -- automatically close the list when you have no diagnostics auto_preview = false, -- automatically preview the location of the diagnostic. to close preview and go back to last window - auto_fold = false, -- automatically fold a file trouble list at creation - auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result + auto_fold = false, -- automatically fold a file trouble list at creation + auto_jump = {}, -- for the given modes, automatically jump if there is only a single result signs = { -- icons / text used for a diagnostic error = "",