From 819c8b06c1e429c47f192f815dc3d6b432998ae8 Mon Sep 17 00:00:00 2001 From: Youcef Mez Date: Sat, 6 Jan 2024 00:44:50 +0100 Subject: [PATCH] fixed notify ctrl+k bug --- .gitignore | 1 + lazy-lock.json | 93 ++++++++++----------- lazyvim.json | 4 +- lua/config/autocmds.lua | 6 +- lua/config/{gotopreview.lua => gotopreview} | 8 ++ lua/config/harpoon | 25 ++++++ lua/config/lazy.lua | 1 + lua/plugins/colorscheme.lua | 79 +++++++++-------- lua/plugins/gotopreview | 15 ++++ lua/plugins/gotopreview.lua | 6 -- lua/plugins/harpoon.lua | 1 + lua/plugins/noice.lua | 15 ++++ lua/plugins/{solarized => solarized.lua} | 4 +- 13 files changed, 162 insertions(+), 96 deletions(-) rename lua/config/{gotopreview.lua => gotopreview} (75%) create mode 100644 lua/config/harpoon create mode 100644 lua/plugins/gotopreview delete mode 100644 lua/plugins/gotopreview.lua create mode 100644 lua/plugins/noice.lua rename lua/plugins/{solarized => solarized.lua} (59%) diff --git a/.gitignore b/.gitignore index ed1d552..403244b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ foo.* *.log data lazy-lock.json +/lazy-lock.json diff --git a/lazy-lock.json b/lazy-lock.json index 3af9e46..4699e2a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,68 +1,63 @@ { - "LazyVim": { "branch": "main", "commit": "68ff818a5bb7549f90b05e412b76fe448f605ffb" }, - "LuaSnip": { "branch": "master", "commit": "1f4ad8bb72bdeb60975e98652636b991a9b7475d" }, - "bufferline.nvim": { "branch": "main", "commit": "9e8d2f695dd50ab6821a6a53a840c32d2067a78a" }, - "catppuccin": { "branch": "main", "commit": "5e4be43e1a6acb044d5c55cd10f22461c40656ed" }, + "LazyVim": { "branch": "main", "commit": "879e29504d43e9f178d967ecc34d482f902e5a91" }, + "LuaSnip": { "branch": "master", "commit": "68153ebb03e65d8a437c6240553645c57f17cf99" }, + "bufferline.nvim": { "branch": "main", "commit": "e48ce1805697e4bb97bc171c081e849a65859244" }, + "catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "ca3dfba94600aa62bfc88ae37cbd4f17eaea2553" }, + "conform.nvim": { "branch": "master", "commit": "24d13dc1e2101d5450bcf20972db445363b52685" }, "dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" }, - "diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" }, - "dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" }, + "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, + "dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, - "fzf-lua": { "branch": "main", "commit": "03d8c35bf7b0541a877348cefc486dcd02142ec7" }, - "gitsigns.nvim": { "branch": "main", "commit": "af0f583cd35286dd6f0e3ed52622728703237e50" }, - "goto-preview": { "branch": "main", "commit": "b428db4d2a5b7c06e149a020e31b2121fbf57a67" }, - "gruvbox.nvim": { "branch": "main", "commit": "517b012757fbe7a4d6e507baf5cc75837e62734f" }, - "harpoon": { "branch": "master", "commit": "c1aebbad9e3d13f20bedb8f2ce8b3a94e39e424a" }, - "indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "fzf-lua": { "branch": "main", "commit": "d4eb38625d22c48512ce8590a6248736ffc067a1" }, + "gitsigns.nvim": { "branch": "main", "commit": "3e6e91b09f0468c32d3b96dcacf4b947f037ce25" }, + "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, + "indent-blankline.nvim": { "branch": "master", "commit": "3c8a185da4b8ab7aef487219f5e001b11d4b6aaf" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lsp-lens.nvim": { "branch": "main", "commit": "d055ed2d3b199bcdfb409b8b184c26c8d9899ac6" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "f6fdcd1d6b56c612e40cf56239c5a394cdb20c35" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "melange-nvim": { "branch": "master", "commit": "ca3444c8e5002ee5ab6f077660317f869c7b6a36" }, - "mini.ai": { "branch": "main", "commit": "4a2e387b121352dfb478f440c9a5313a9d97006c" }, - "mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" }, - "mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" }, - "mini.indentscope": { "branch": "main", "commit": "c8fdafa7bf603d758986a27eb546c55a5c73b1a3" }, - "mini.pairs": { "branch": "main", "commit": "71f117fd57f930da6ef4126b24f594dd398bac26" }, - "mini.surround": { "branch": "main", "commit": "af8129efcabe95fc08a233e9f91569829bed031f" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "f053f09962819c1558cd93639aa80edf7c314c17" }, + "lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" }, + "lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, + "mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" }, + "mini.ai": { "branch": "main", "commit": "f7787cff9cc42004f722ca1e64e6af4e64e34177" }, + "mini.bufremove": { "branch": "main", "commit": "020243bfed8c8b941f2c20626faf3ea39c0c0e1b" }, + "mini.comment": { "branch": "main", "commit": "67f00d3ebbeae15e84584d971d0c32aad4f4f3a4" }, + "mini.indentscope": { "branch": "main", "commit": "5a8369475cd7cd6f207a4d288406d03b0fc48bdb" }, + "mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" }, + "mini.surround": { "branch": "main", "commit": "7bf8915ba15d7a4f3c2afe7868d3c15a858d73f1" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" }, "neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" }, - "neodev.nvim": { "branch": "main", "commit": "1fc168ee385441994d7e9397e854cb20f5c7e324" }, - "neogit": { "branch": "master", "commit": "c14b5349cbb88c3a8e7dff05df17b7ab29b2e369" }, - "neotest": { "branch": "master", "commit": "d424d262d01bccc1e0b038c9a7220a755afd2a1f" }, - "neotest-go": { "branch": "main", "commit": "1a15e1136db43775214a3e7a598f8930c29c94b7" }, + "neodev.nvim": { "branch": "main", "commit": "be8d4d4cab6c13c6a572269c9d6a63774baba9a0" }, + "neogit": { "branch": "master", "commit": "93bf00cd5db1e88ea0ca9105e83f7e97896a7cd2" }, + "neovim": { "branch": "main", "commit": "92762f4fa2144c05db760ea254f4c399a56a7ef5" }, "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, - "none-ls.nvim": { "branch": "main", "commit": "728bc36f2c697f0dce201dc63687a6b676de6420" }, - "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" }, - "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, - "nvim-lint": { "branch": "master", "commit": "4f2d968a827d86bb40b7b1fad28c11f7b764fef3" }, - "nvim-lspconfig": { "branch": "master", "commit": "0a0682d4646a6869b85a4e4d0e30da5ef8b11f66" }, - "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, - "nvim-spectre": { "branch": "master", "commit": "dd61feafc250c6ef81240a94b4365132f99a4cfc" }, - "nvim-treesitter": { "branch": "master", "commit": "c0da2013d1cef768c00f3f0b7f365fe19a10bca3" }, - "nvim-treesitter-context": { "branch": "master", "commit": "c03f8aab1e6649036d69ba7e3af4d09cb7e4d977" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "dbcd9388e3b119a87c785e10a00d62876077d23d" }, - "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "6c30f3c8915d7b31c3decdfe6c7672432da1809d" }, - "nvim-web-devicons": { "branch": "master", "commit": "11eb26fc166742db8d1e8a6f5a7de9df37b09aae" }, + "none-ls.nvim": { "branch": "main", "commit": "fbdcbf8e152529af846b3a333f039751829b84c2" }, + "nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-lint": { "branch": "master", "commit": "d44185d3e57e00c164485a454174294b36ef7067" }, + "nvim-lspconfig": { "branch": "master", "commit": "ce0e625df61be77abe1340fbc9afe9ad39b31dd8" }, + "nvim-notify": { "branch": "master", "commit": "1576123bff3bed67bc673a3076e591abfe5d8ca9" }, + "nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" }, + "nvim-treesitter": { "branch": "master", "commit": "49f1b9a7efc794be143f7ddcd60ce18e8164a7f8" }, + "nvim-treesitter-context": { "branch": "master", "commit": "652ec514d6ba8bc4a3c2de76c855fe668e2c7196" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "85b9d0cbd4ff901abcda862b50dbb34e0901848b" }, + "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, + "nvim-web-devicons": { "branch": "master", "commit": "3e24abe1ae66532135cec911562f553fe247cb56" }, "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, - "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "solarized.nvim": { "branch": "main", "commit": "81d23d44c92b869b439a7c17fb3a1b68005775d7" }, - "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, + "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "solarized.nvim": { "branch": "main", "commit": "b66b6dcc7fc983bd1846d6557fe7cce0d8a36f49" }, + "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope.nvim": { "branch": "master", "commit": "20bf20500c95208c3ac0ef07245065bf94dcab15" }, + "telescope.nvim": { "branch": "master", "commit": "87e92ea31b2b61d45ad044cf7b2d9b66dad2a618" }, "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, - "vscode.nvim": { "branch": "main", "commit": "563e3f671543ba14f23ccb57020a428add640d02" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lazyvim.json b/lazyvim.json index 36d2b41..05bbea2 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -3,11 +3,11 @@ "lazyvim.plugins.extras.editor.symbols-outline", "lazyvim.plugins.extras.formatting.prettier", "lazyvim.plugins.extras.lang.go", + "lazyvim.plugins.extras.lang.ruby", "lazyvim.plugins.extras.lang.tailwind", "lazyvim.plugins.extras.lang.typescript", "lazyvim.plugins.extras.linting.eslint", - "lazyvim.plugins.extras.lsp.none-ls", - "lazyvim.plugins.extras.test.core" + "lazyvim.plugins.extras.lsp.none-ls" ], "news": { "NEWS.md": "2123" diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 60a43b0..9178389 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -15,6 +15,10 @@ -- end, -- }) -- vim.cmd('hi "IlluminatedWordText guibg=#504945 gui=bold"') + +-- vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { +-- command = "hi IlluminatedWordText guibg=#504945 gui=bold", +-- }) vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { - command = "hi IlluminatedWordText guibg=#504945 gui=bold", + command = "set foldmethod=manual", }) diff --git a/lua/config/gotopreview.lua b/lua/config/gotopreview similarity index 75% rename from lua/config/gotopreview.lua rename to lua/config/gotopreview index b52f21f..3408338 100644 --- a/lua/config/gotopreview.lua +++ b/lua/config/gotopreview @@ -18,4 +18,12 @@ require("goto-preview").setup({ bufhidden = "wipe", -- the bufhidden option to set on the floating window. See :h bufhidden stack_floating_preview_windows = true, -- Whether to nest floating windows preview_window_title = { enable = true, position = "left" }, -- Whether to set the preview window title as the filename + -- keys = { + -- { "gpd", "lua require('goto-preview').goto_preview_definition()" }, + -- { "gpt", "lua require('goto-preview').goto_preview_type_definition()" }, + -- { "gpi", "lua require('goto-preview').goto_preview_implementation()" }, + -- { "gpD", "lua require('goto-preview').goto_preview_declaration()" }, + -- { "gP", "lua require('goto-preview').close_all_win()" }, + -- { "gpr", "lua require('goto-preview').goto_preview_references()" }, + -- }, }) diff --git a/lua/config/harpoon b/lua/config/harpoon new file mode 100644 index 0000000..41e7700 --- /dev/null +++ b/lua/config/harpoon @@ -0,0 +1,25 @@ +local harpoon = require("harpoon") + +-- REQUIRED +harpoon:setup() +-- REQUIRED + +vim.keymap.set("n", "h", function() + harpoon:list():append() +end) +vim.keymap.set("n", "", function() + harpoon.ui:toggle_quick_menu(harpoon:list()) +end) + +vim.keymap.set("n", "", function() + harpoon:list():select(1) +end) +vim.keymap.set("n", "", function() + harpoon:list():select(2) +end) +vim.keymap.set("n", "", function() + harpoon:list():select(3) +end) +vim.keymap.set("n", "", function() + harpoon:list():select(4) +end) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index e467fee..bb45e8a 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -40,6 +40,7 @@ require("lazy").setup({ "tohtml", "tutor", "zipPlugin", + "bufferline.nvim", }, }, }, diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 8417009..bd7579e 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,57 +1,62 @@ return { -- add gruvbox - { - "ellisonleao/gruvbox.nvim", - priority = 1000, - config = true, - opts = function() - return { - terminal_colors = true, -- add neovim terminal colors - undercurl = true, - underline = true, - bold = true, - italic = { - strings = true, - emphasis = true, - comments = true, - operators = false, - folds = true, - }, - strikethrough = true, - invert_selection = false, - invert_signs = false, - invert_tabline = false, - invert_intend_guides = false, - inverse = true, -- invert background for search, diffs, statuslines and errors - contrast = "hard", -- can be "hard", "soft" or empty string - palette_overrides = {}, - overrides = {}, - dim_inactive = false, - transparent_mode = false, - } - end, - }, + -- { + -- "ellisonleao/gruvbox.nvim", + -- priority = 1000, + -- config = true, + -- opts = function() + -- return { + -- terminal_colors = true, -- add neovim terminal colors + -- undercurl = true, + -- underline = true, + -- bold = true, + -- italic = { + -- strings = true, + -- emphasis = true, + -- comments = true, + -- operators = false, + -- folds = true, + -- }, + -- strikethrough = true, + -- invert_selection = false, + -- invert_signs = false, + -- invert_tabline = false, + -- invert_intend_guides = false, + -- inverse = true, -- invert background for search, diffs, statuslines and errors + -- contrast = "hard", -- can be "hard", "soft" or empty string + -- palette_overrides = {}, + -- overrides = {}, + -- dim_inactive = false, + -- transparent_mode = false, + -- } + -- end, + -- }, -- { "tanvirtin/monokai.nvim" }, -- Configure LazyVim to load gruvbox - { "savq/melange-nvim" }, - { "Mofiqul/vscode.nvim" }, + -- { "savq/melange-nvim" }, + -- -- { "Mofiqul/vscode.nvim" }, -- { "catppuccin/nvim" }, - -- { "shaunsingh/solarized.nvim" }, + -- { "sainnhe/sonokai" }, -- { "maxmx03/solarized.nvim" }, -- { + -- + -- "yorik1984/newpaper.nvim", + -- }, + -- { -- "folke/tokyonight.nvim", -- lazy = false, -- priority = 1000, -- opts = {}, -- }, + { "rose-pine/neovim" }, { "LazyVim/LazyVim", opts = { - colorscheme = "gruvbox", - -- colorscheme = "melange", + -- colorscheme = "gruvbox", + colorscheme = "solarized", -- colorscheme = "tokyonight", -- colorscheme = "night-owl", - -- transparent = true, + transparent = true, }, }, } diff --git a/lua/plugins/gotopreview b/lua/plugins/gotopreview new file mode 100644 index 0000000..4cf0402 --- /dev/null +++ b/lua/plugins/gotopreview @@ -0,0 +1,15 @@ +return { + "rmagatti/goto-preview", + config = function() + require("goto-preview").setup({}) + end, + + keys = { + { "gpd", "lua require('goto-preview').goto_preview_definition()" }, + { "gpt", "lua require('goto-preview').goto_preview_type_definition()" }, + { "gpi", "lua require('goto-preview').goto_preview_implementation()" }, + { "gpD", "lua require('goto-preview').goto_preview_declaration()" }, + { "gP", "lua require('goto-preview').close_all_win()" }, + { "gpr", "lua require('goto-preview').goto_preview_references()" }, + }, +} diff --git a/lua/plugins/gotopreview.lua b/lua/plugins/gotopreview.lua deleted file mode 100644 index a3fb692..0000000 --- a/lua/plugins/gotopreview.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "rmagatti/goto-preview", - config = function() - require("goto-preview").setup({}) - end, -} diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua index 57a0bae..a809017 100644 --- a/lua/plugins/harpoon.lua +++ b/lua/plugins/harpoon.lua @@ -1,5 +1,6 @@ return { "ThePrimeagen/harpoon", + -- branch = "harpoon2", lazy = false, dependencies = { "nvim-lua/plenary.nvim", diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua new file mode 100644 index 0000000..e456439 --- /dev/null +++ b/lua/plugins/noice.lua @@ -0,0 +1,15 @@ +return { + -- https://github.com/folke/noice.nvim + { + "folke/noice.nvim", + opts = { + lsp = { + hover = { + -- Set not show a message if hover is not available + -- ex: shift+k on Typescript code + silent = true, + }, + }, + }, + }, +} diff --git a/lua/plugins/solarized b/lua/plugins/solarized.lua similarity index 59% rename from lua/plugins/solarized rename to lua/plugins/solarized.lua index 1c5576d..11a8e38 100644 --- a/lua/plugins/solarized +++ b/lua/plugins/solarized.lua @@ -5,6 +5,8 @@ return { config = function() vim.o.background = "light" -- or 'light' - vim.cmd.colorscheme("solarized") + terminal_colors = + true, -- add neovim terminal colors + vim.cmd.colorscheme("solarized") end, }