From 647cae63e3e71e268d5b9a9026c65b624b1b6fc3 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Fri, 25 Jul 2025 12:05:40 +0200 Subject: [PATCH] Updated scripts --- config/nvim/init.lua | 72 ++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 71309b4..a00c88e 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -146,19 +146,6 @@ require("lazy").setup({ map("gO", require("fzf-lua").lsp_document_symbols, "Open Document Symbols") map("gW", require("fzf-lua").lsp_live_workspace_symbols, "Open Workspace Symbols") map("grt", require("fzf-lua").lsp_typedefs, "[G]oto [T]ype Definition") - - -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) - ---@param client vim.lsp.Client - ---@param method vim.lsp.protocol.Method - ---@param bufnr? integer some lsp support methods only in specific files - ---@return boolean - local function client_supports_method(client, method, bufnr) - if vim.fn.has("nvim-0.11") == 1 then - return client:supports_method(method, bufnr) - else - return client.supports_method(method, { bufnr = bufnr }) - end - end end, }) @@ -256,22 +243,8 @@ require("lazy").setup({ "saghen/blink.cmp", event = "VimEnter", version = "1.*", - dependencies = { - -- Snippet Engine - { - "L3MON4D3/LuaSnip", - version = "2.*", - build = (function() - if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then - return - end - return "make install_jsregexp" - end)(), - dependencies = {}, - opts = {}, - }, - "folke/lazydev.nvim", - }, + -- optional: provides snippets for the snippet source + dependencies = { "rafamadriz/friendly-snippets" }, --- @module 'blink.cmp' --- @type blink.cmp.Config opts = { @@ -288,15 +261,10 @@ require("lazy").setup({ }, sources = { - default = { "lsp", "buffer", "path", "snippets", "lazydev" }, - providers = { - lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, - }, + default = { "lsp", "buffer", "path", "snippets" }, }, - snippets = { preset = "luasnip" }, fuzzy = { implementation = "prefer_rust_with_warning" }, - signature = { enabled = true }, }, }, @@ -333,13 +301,12 @@ require("lazy").setup({ "ibhagwan/fzf-lua", dependencies = { "echasnovski/mini.icons" }, opts = { - "fzf-tmux", - fzf_opts = { ["--tmux"] = "center,80%,80%" }, + "telescope", fzf_colors = { true, -- inherit fzf colors that aren't specified below from -- the auto-generated theme similar to `fzf_colors=true` ["fg"] = { "fg", "CursorLine" }, - ["bg"] = { "bg", "Black" }, + ["bg"] = { "bg", "Normal" }, ["hl"] = { "fg", "Comment" }, ["fg+"] = { "fg", "Normal", "underline" }, ["bg+"] = { "bg", { "CursorLine", "Normal" } }, @@ -365,6 +332,9 @@ require("lazy").setup({ lazy = false, opts = { at_edge = "stop", + float_win_behavior = "mux", + ignored_buftypes = { "nofile", "quickfix", "prompt", "fzf" }, + ignored_filetypes = { "NvimTree", "fzf" }, }, }, @@ -489,6 +459,16 @@ require("lazy").setup({ }, }, + { + "MeanderingProgrammer/render-markdown.nvim", + -- dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" }, -- if you use the mini.nvim suite + dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.icons" }, -- if you use standalone mini plugins + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = {}, + }, + { "lukas-reineke/indent-blankline.nvim", main = "ibl", @@ -517,8 +497,19 @@ require("lazy").setup({ }, { - "stevearc/dressing.nvim", - opts = {}, + "folke/noice.nvim", + event = "VeryLazy", + opts = { + -- add any options here + }, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + "rcarriga/nvim-notify", + }, }, { @@ -569,3 +560,4 @@ vim.keymap.set("n", "b", ":FzfLua buffers", { desc = "Buffers", sile vim.keymap.set("n", "d", ":FzfLua lsp_document_diagnostics", { desc = "Diagnostics", silent = true }) vim.keymap.set("n", "o", ":FzfLua oldfiles", { desc = "Old file", silent = true }) vim.keymap.set("n", "g", ":FzfLua git_status", { desc = "Git status", silent = true }) +vim.keymap.set("n", "t", ":below terminal", { desc = "Terminal", silent = true })