This commit is contained in:
fiplox 2023-06-27 11:08:53 +02:00
parent 0050526934
commit 1aedb8a474
7 changed files with 22 additions and 40 deletions

View File

@ -22,7 +22,7 @@ vim.api.nvim_create_autocmd('User', {
require 'config.mappings'
require 'config.autocmd'
require 'nvim-treesitter'
require 'noice'
require 'dressing'
end,
})

View File

@ -35,10 +35,10 @@ keymap('v', '<leader>r', ':s///gI<Left><Left><Left><Left>', { noremap = true })
keymap('n', 'D', '"_d', { noremap = true })
keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opt)
keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opt)
keymap('n', 'gd', '<cmd>TroubleToggle lsp_definitions<CR>', opt)
keymap('n', 'gr', '<cmd>TroubleToggle lsp_references<CR>', opt)
keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.hover()<CR>', opt)
keymap('n', 'gI', '<cmd>lua vim.lsp.buf.implementation()<CR>', opt)
keymap('n', 'gI', '<cmd>TroubleToggle lsp_implementations<CR>', opt)
keymap('n', 'gl', '<cmd>lua vim.diagnostic.open_float()<CR>', opt)
keymap('n', '<leader>lf', '<cmd>lua vim.lsp.buf.format { async = true }<cr>', opt)
keymap('n', '<leader>li', '<cmd>LspInfo<cr>', opt)

View File

@ -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 { '-' }

View File

@ -93,6 +93,7 @@ return {
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'neorg' },
{ name = 'snippy' },
{ name = 'path' },
{ name = 'buffer' },

View File

@ -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",
},
},
},

View File

@ -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",
}
}

View File

@ -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. <esc> 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 = "",