diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 45a56a7..ef2ee23 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -8,11 +8,11 @@ "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-zotcite": { "branch": "main", "commit": "281f43726bed2c5eb96bea1544edcf2e069795db" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "40d4e98fcc3e6f485f0e8924c63734bc7e305967" }, "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, + "flutter-tools.nvim": { "branch": "main", "commit": "ce18f5da5f9c458cd26eef5c3accb0c37b2263c2" }, "friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" }, "fzf-lua": { "branch": "main", "commit": "ace9968be267b034e450be4feaf6e9107bc34fbd" }, "gruvbox-material": { "branch": "master", "commit": "b16dcd787db5ba9302b54ebeac186784c2aed29a" }, @@ -24,18 +24,22 @@ "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markview.nvim": { "branch": "main", "commit": "fb10bcbb401780234c2e8bd2ec3fc85a94521944" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.ai": { "branch": "main", "commit": "9b9b7cfa38b4871c3e44cfe89cf6d53fd40684d9" }, - "mini.notify": { "branch": "main", "commit": "1c901d62581439f3d17382a5bf7001a282d6468b" }, + "mini.files": { "branch": "main", "commit": "f5d06532a9b8cfff0f17226bf8ae7b15227ddb88" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" }, "nvim-cmp": { "branch": "perf", "commit": "6c3d595f3223c1ae7392d4fde1626355439af6c1" }, + "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, + "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, "nvim-lspconfig": { "branch": "master", "commit": "dcf511d53fae9675c6fde4241d94b2daaa5e0cd5" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-treesitter": { "branch": "master", "commit": "4f04fb7027ce786ac4adfd1c629ca40aea96ffec" }, "nvim-treesitter-context": { "branch": "master", "commit": "78a81c7494e7d1a08dd1200b556933e513fd9f29" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "b91c98afa6c42819aea6cbc1ba38272f5456a5cf" }, "nvim-web-devicons": { "branch": "master", "commit": "56f17def81478e406e3a8ec4aa727558e79786f3" }, - "oil.nvim": { "branch": "master", "commit": "ccab9d5e09e2d0042fbbe5b6bd05e82426247067" }, + "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, "pastify.nvim": { "branch": "main", "commit": "5e0e7e5e1b4880476a35a82d3dfe93764a9a37da" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "rustaceanvim": { "branch": "master", "commit": "29f42cc149f915d771c550b6dfe7c788d856cf04" }, diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 6d3367b..2e85eaf 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -108,6 +108,16 @@ return { }, { { name = "buffer", keyword_length = 5 }, }), + window = { + completion = { + border = "rounded", + winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None", + }, + documentation = { + border = "rounded", + winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None", + }, + } }) local cmp_autopairs = require("nvim-autopairs.completion.cmp") diff --git a/.config/nvim/lua/plugins/editing.lua b/.config/nvim/lua/plugins/editing.lua index 0088202..2e28a3a 100644 --- a/.config/nvim/lua/plugins/editing.lua +++ b/.config/nvim/lua/plugins/editing.lua @@ -22,4 +22,34 @@ return { }) end, }, + + { + "epwalsh/obsidian.nvim", + version = "v3.9.0", + lazy = true, + ft = "markdown", + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = { + workspaces = { + { + name = "tese", + path = "~/vaults/uni/tese/", + }, + { + name = "chronolens", + path = "~/vaults/uni/chronolens/", + }, + }, + completion = { + nvim_cmp = true, + min_chars = 2, + }, + picker = { + name = "fzf-lua", + }, + + }, + } } diff --git a/.config/nvim/lua/plugins/fzf-lua.lua b/.config/nvim/lua/plugins/fzf-lua.lua index f13880c..4bae661 100644 --- a/.config/nvim/lua/plugins/fzf-lua.lua +++ b/.config/nvim/lua/plugins/fzf-lua.lua @@ -8,7 +8,6 @@ return { fzflua.register_ui_select() fzflua.setup({ defaults = { - headers = false, winopts = { border = "single", width = 0.6, @@ -19,7 +18,7 @@ return { previewer = false, winopts = { width = 0.5, - height = 0.3, + height = 0.5, } }, grep = { @@ -37,6 +36,7 @@ return { vim.keymap.set('n', 'fg', fzflua.live_grep, {}) vim.keymap.set('n', 'fb', fzflua.buffers, {}) vim.keymap.set('n', 'fh', fzflua.help_tags, {}) + vim.keymap.set({'n','v'}, 'fc', fzflua.commands, {}) end } } diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index e8412ec..04fa069 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -199,7 +199,7 @@ return { vim.keymap.set("n", "k", vim.lsp.buf.signature_help, bufopts) vim.keymap.set("n", "D", vim.lsp.buf.type_definition, bufopts) vim.keymap.set("n", "rn", rename_func, bufopts_expr) - vim.keymap.set("n", "ca", vim.lsp.buf.code_action, bufopts) + vim.keymap.set({"n","v"}, "ca", vim.lsp.buf.code_action, bufopts) vim.keymap.set("n", "ge", vim.diagnostic.goto_next, bufopts) vim.keymap.set("n", "gE", vim.diagnostic.goto_prev, bufopts) vim.keymap.set("n", "fo", function() conform.format({ lsp_fallback = true }) end, bufopts) diff --git a/.config/nvim/lua/plugins/navigation.lua b/.config/nvim/lua/plugins/navigation.lua index 3952476..4370864 100644 --- a/.config/nvim/lua/plugins/navigation.lua +++ b/.config/nvim/lua/plugins/navigation.lua @@ -18,8 +18,64 @@ return { }, { "stevearc/oil.nvim", - opts = {}, + config = function() + require("oil").setup({ + float = { + preview_split = "right" + }, + }) + -- Function to open oil.nvim in a vertical split + local function open_oil_split() + -- Calculate the width for the split (20% of the total width) + local width = math.floor(vim.o.columns * 0.2) -- 20% of total width + -- Create a vertical split and set width + vim.cmd("vsplit") -- Create a vertical split + vim.cmd(string.format("vertical resize %d", width)) -- Resize to 20% + -- Open oil in the new split + require("oil").open() -- Use open() to open oil.nvim + end + + -- Key mapping to open oil in a vertical split + vim.api.nvim_set_keymap('n', 'o', ':lua require("oil").open_float()', { noremap = true, silent = true }) + vim.keymap.set('n', 'O', open_oil_split, { noremap = true, silent = true }) + + end }, + -- { + -- 'echasnovski/mini.files', + -- version = false, + -- opts = { + -- mappings = { + -- close = 'q', + -- go_in = '', + -- go_in_plus = 'l', + -- go_out = '', + -- go_out_plus = 'h', + -- reset = '', + -- show_help = 'g?', + -- synchronize = 's', + -- }, + -- options = { + -- permanent_delete = false + -- } + -- }, + -- keys = { + -- { + -- "o", + -- function() + -- require("mini.files").open(vim.api.nvim_buf_get_name(0), true) + -- end, + -- desc = "Open mini.files (Directory of the current file)" + -- }, + -- { + -- "O", + -- function() + -- require("mini.files").open(vim.uv.cwd(), true) + -- end, + -- desc = "Open mini.files (cwd)" + -- } + -- } + -- }, { 'mrjones2014/smart-splits.nvim', config = function() diff --git a/.config/nvim/lua/plugins/ui.lua b/.config/nvim/lua/plugins/ui.lua index 02b5d59..b2b56bd 100644 --- a/.config/nvim/lua/plugins/ui.lua +++ b/.config/nvim/lua/plugins/ui.lua @@ -24,24 +24,23 @@ return { event = "VeryLazy", ft = 'qf' }, - { - "OXY2DEV/markview.nvim", - ft = "markdown", - dependencies = { - "nvim-treesitter/nvim-treesitter", - "nvim-tree/nvim-web-devicons", - }, - opts = { - modes = { "n", "no", "i", "c" }, - hybrid_modes = { "i" }, - callbacks = { - on_enable = function(_, win) - vim.wo[win].conceallevel = 2; - vim.wo[win].concealcursor = "c"; - end - } - } - }, + -- { + -- "OXY2DEV/markview.nvim", + -- ft = "markdown", + -- dependencies = { + -- "nvim-treesitter/nvim-treesitter", + -- "nvim-tree/nvim-web-devicons", + -- }, + -- opts = { + -- modes = { "n", "no", "c" }, + -- callbacks = { + -- on_enable = function(_, win) + -- vim.wo[win].conceallevel = 2; + -- vim.wo[win].concealcursor = "c"; + -- end + -- } + -- } + -- }, { "folke/zen-mode.nvim", event = "VeryLazy",