diff --git a/.snapshots/default b/.snapshots/default index b52b1903..c4ee7c8b 100644 --- a/.snapshots/default +++ b/.snapshots/default @@ -1 +1 @@ -{"vimtex": {"commit": "54fd9f5b"}, "rest.nvim": {"commit": "4a23d38"}, "nvim-dap": {"commit": "0b320f5"}, "lvim-colorscheme": {"commit": "518d6ab"}, "pubspec-assist.nvim": {"commit": "745beca"}, "guihua.lua": {"commit": "baebba3"}, "package-info.nvim": {"commit": "9e81a05"}, "telescope-fzf-native.nvim": {"commit": "65c0ee3"}, "packer.nvim": {"commit": "6afb674"}, "nvim-notify": {"commit": "4144654"}, "heirline.nvim": {"commit": "9179b71"}, "nvim-navic": {"commit": "132b273"}, "nvim-spectre": {"commit": "6d877bc"}, "dirbuf.nvim": {"commit": "ac7ad3c"}, "go.nvim": {"commit": "a32e0c2"}, "vim-table-mode": {"commit": "f47287d"}, "howdoi.nvim": {"commit": "b39740a"}, "nvim-lightbulb": {"commit": "56b9ce3"}, "vim-dadbod-ui": {"commit": "29ffd51"}, "calendar-vim": {"commit": "a7e73e0"}, "nvim-hlslens": {"commit": "5e6ea33"}, "nvim-treesitter": {"commit": "7ccb9a05"}, "null-ls.nvim": {"commit": "c0c19f3"}, "code_runner.nvim": {"commit": "cbdd429"}, "neo-tree-diagnostics.nvim": {"commit": "137ba57"}, "which-key.nvim": {"commit": "6885b66"}, "telescope-file-browser.nvim": {"commit": "b1bc53e"}, "twilight.nvim": {"commit": "1ffa6a4"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "2be79d8"}, "crates.nvim": {"commit": "1dffccc"}, "nvim-colorizer.lua": {"commit": "9dd7ecd"}, "lvim-focus": {"commit": "fc48728"}, "vim-dadbod": {"commit": "b100acc"}, "NeoZoom.lua": {"commit": "de0e27a"}, "lvim-helper": {"commit": "7fe74bd"}, "nvim-lsp-ts-utils": {"commit": "0a6a16e"}, "rust-tools.nvim": {"commit": "86a2b4e"}, "neogit": {"commit": "74c9e29"}, "nvim-treesitter-textsubjects": {"commit": "ed026cf"}, "alpha-nvim": {"commit": "0bb6fc0"}, "any-jump.vim": {"commit": "67b1737"}, "gitsigns.nvim": {"commit": "f98c85e"}, "vim-ctrlspace": {"commit": "05b58e9"}, "indent-blankline.nvim": {"commit": "db7cbcb"}, "toggleterm.nvim": {"commit": "f494c61"}, "nvim-ts-autotag": {"commit": "fdefe46"}, "neo-tree.nvim": {"commit": "e968cda"}, "telescope.nvim": {"commit": "0b1c41a"}, "nvim-pqf": {"commit": "1bf0758"}, "awesome-flutter-snippets": {"commit": "48d4b8b"}, "tabby.nvim": {"commit": "b46ee53"}, "Comment.nvim": {"commit": "97a188a"}, "nvim-gomove": {"commit": "2b44ae7"}, "goto-preview": {"commit": "a5af27c"}, "mason.nvim": {"commit": "8f9c47a"}, "flutter-tools.nvim": {"commit": "15b770d"}, "todo-comments.nvim": {"commit": "8df75db"}, "vim-bufsurf": {"commit": "e6dbc7a"}, "nvim-lspconfig": {"commit": "fc2f44d"}, "sniprun": {"commit": "d5d4eb7"}, "cinnamon.nvim": {"commit": "7594df8"}, "LuaSnip": {"commit": "8f8d493"}, "rg.nvim": {"commit": "396bd07"}, "nvim-bqf": {"commit": "aea3156"}, "nvim-dap-ui": {"commit": "c8ce83a"}, "popup.nvim": {"commit": "b7404d3"}, "one-small-step-for-vimkind": {"commit": "f0249e8"}, "lsp-inlayhints.nvim": {"commit": "9bcd6fe"}, "symbols-outline.nvim": {"commit": "6a3ed24"}, "nvim-web-devicons": {"commit": "563f363"}, "zen-mode.nvim": {"commit": "6f5702d"}, "lua-dev.nvim": {"commit": "c8139fc"}, "pretty-fold.nvim": {"commit": "a7d8b42"}, "nvim-markdown-preview": {"commit": "3d6f941"}, "nui.nvim": {"commit": "e9889bb"}, "impatient.nvim": {"commit": "b842e16"}, "fm-nvim": {"commit": "e5df86a"}, "lvim-org-utils": {"commit": "43317af"}, "virtcolumn.nvim": {"commit": "cd9485d"}, "orgmode": {"commit": "95f9273"}, "hop.nvim": {"commit": "2a1b686"}, "neogen": {"commit": "967b280"}, "undotree": {"commit": "bf76bf2"}, "telescope-tmux.nvim": {"commit": "bb719ca"}, "diffview.nvim": {"commit": "6baa30d"}, "stay-in-place.nvim": {"commit": "c7aa6ca"}, "fidget.nvim": {"commit": "70cd8b1"}, "vim-dadbod-completion": {"commit": "22ef15e"}, "hover.nvim": {"commit": "479283a"}, "trld.nvim": {"commit": "f995551"}, "plenary.nvim": {"commit": "4b7e520"}, "nvim-surround": {"commit": "1719167"}, "nvim-cmp": {"commit": "b0dff0e"}, "nvim-treesitter-context": {"commit": "8d0759e"}, "nvim-autopairs": {"commit": "4fc96c8"}, "fold-preview.nvim": {"commit": "33c2410"}, "color-picker.nvim": {"commit": "2b4a4a4"}, "cmp-path": {"commit": "91ff86c"}, "octo.nvim": {"commit": "e634cd1"}, "cmp-latex-symbols": {"commit": "46e7627"}, "git-blame.nvim": {"commit": "08e75b7"}, "fzf": {"commit": "04d0b02"}, "cmp-buffer": {"commit": "3022dbc"}} +{"vim-table-mode": {"commit": "f47287d"}, "vimtex": {"commit": "06ae45a2"}, "rest.nvim": {"commit": "4a23d38"}, "nvim-dap": {"commit": "0b320f5"}, "lvim-colorscheme": {"commit": "518d6ab"}, "pubspec-assist.nvim": {"commit": "745beca"}, "guihua.lua": {"commit": "5d7f455"}, "package-info.nvim": {"commit": "9e81a05"}, "telescope-fzf-native.nvim": {"commit": "65c0ee3"}, "packer.nvim": {"commit": "6afb674"}, "nvim-notify": {"commit": "4144654"}, "nvim-lspconfig": {"commit": "fc2f44d"}, "nvim-spectre": {"commit": "6d877bc"}, "dirbuf.nvim": {"commit": "ac7ad3c"}, "go.nvim": {"commit": "1aef2d6"}, "lvim-org-utils": {"commit": "43317af"}, "howdoi.nvim": {"commit": "b39740a"}, "nvim-lightbulb": {"commit": "56b9ce3"}, "vim-dadbod-ui": {"commit": "29ffd51"}, "calendar-vim": {"commit": "a7e73e0"}, "pretty-fold.nvim": {"commit": "a7d8b42"}, "null-ls.nvim": {"commit": "4e1118c"}, "code_runner.nvim": {"commit": "cbdd429"}, "neo-tree-diagnostics.nvim": {"commit": "137ba57"}, "which-key.nvim": {"commit": "6885b66"}, "telescope-file-browser.nvim": {"commit": "b1bc53e"}, "hover.nvim": {"commit": "479283a"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "9f4ffd1"}, "nvim-web-devicons": {"commit": "a8cf88c"}, "crates.nvim": {"commit": "1dffccc"}, "nvim-colorizer.lua": {"commit": "9dd7ecd"}, "toggleterm.nvim": {"commit": "f494c61"}, "vim-dadbod": {"commit": "b100acc"}, "lvim-helper": {"commit": "7fe74bd"}, "nvim-lsp-ts-utils": {"commit": "0a6a16e"}, "rust-tools.nvim": {"commit": "86a2b4e"}, "neogit": {"commit": "74c9e29"}, "nvim-treesitter-textsubjects": {"commit": "ce47997"}, "alpha-nvim": {"commit": "0bb6fc0"}, "NeoZoom.lua": {"commit": "3a5ecbc"}, "gitsigns.nvim": {"commit": "f98c85e"}, "vim-ctrlspace": {"commit": "05b58e9"}, "indent-blankline.nvim": {"commit": "db7cbcb"}, "nvim-ts-autotag": {"commit": "fdefe46"}, "neo-tree.nvim": {"commit": "e968cda"}, "noice.nvim": {"commit": "a5a529f"}, "sniprun": {"commit": "d5d4eb7"}, "telescope.nvim": {"commit": "0b1c41a"}, "nvim-pqf": {"commit": "1bf0758"}, "awesome-flutter-snippets": {"commit": "48d4b8b"}, "tabby.nvim": {"commit": "b46ee53"}, "Comment.nvim": {"commit": "97a188a"}, "orgmode": {"commit": "017570f"}, "nvim-gomove": {"commit": "2b44ae7"}, "goto-preview": {"commit": "a5af27c"}, "mason.nvim": {"commit": "cc6404a"}, "flutter-tools.nvim": {"commit": "15b770d"}, "todo-comments.nvim": {"commit": "8df75db"}, "vim-bufsurf": {"commit": "e6dbc7a"}, "nvim-hlslens": {"commit": "5e6ea33"}, "nvim-autopairs": {"commit": "4fc96c8"}, "cinnamon.nvim": {"commit": "7594df8"}, "LuaSnip": {"commit": "8f8d493"}, "rg.nvim": {"commit": "396bd07"}, "nvim-bqf": {"commit": "67a7351"}, "nvim-dap-ui": {"commit": "c8ce83a"}, "popup.nvim": {"commit": "b7404d3"}, "fold-preview.nvim": {"commit": "0cabe8a"}, "lsp-inlayhints.nvim": {"commit": "9bcd6fe"}, "symbols-outline.nvim": {"commit": "6a3ed24"}, "octo.nvim": {"commit": "e634cd1"}, "zen-mode.nvim": {"commit": "6f5702d"}, "lua-dev.nvim": {"commit": "40fb57d"}, "nvim-treesitter": {"commit": "dd4e6232"}, "nui.nvim": {"commit": "4715f60"}, "impatient.nvim": {"commit": "b842e16"}, "fm-nvim": {"commit": "e5df86a"}, "any-jump.vim": {"commit": "67b1737"}, "virtcolumn.nvim": {"commit": "cd9485d"}, "heirline.nvim": {"commit": "9179b71"}, "hop.nvim": {"commit": "2a1b686"}, "neogen": {"commit": "967b280"}, "undotree": {"commit": "bf76bf2"}, "telescope-tmux.nvim": {"commit": "bb719ca"}, "diffview.nvim": {"commit": "7c149a4"}, "lvim-focus": {"commit": "fc48728"}, "nvim-navic": {"commit": "132b273"}, "fidget.nvim": {"commit": "70cd8b1"}, "vim-dadbod-completion": {"commit": "22ef15e"}, "twilight.nvim": {"commit": "1ffa6a4"}, "trld.nvim": {"commit": "f995551"}, "plenary.nvim": {"commit": "4b7e520"}, "nvim-markdown-preview": {"commit": "3d6f941"}, "nvim-cmp": {"commit": "b0dff0e"}, "nvim-treesitter-context": {"commit": "8d0759e"}, "one-small-step-for-vimkind": {"commit": "5bfb69c"}, "color-picker.nvim": {"commit": "2b4a4a4"}, "nvim-surround": {"commit": "1719167"}, "cmp-path": {"commit": "91ff86c"}, "stay-in-place.nvim": {"commit": "c7aa6ca"}, "cmp-latex-symbols": {"commit": "46e7627"}, "git-blame.nvim": {"commit": "08e75b7"}, "fzf": {"commit": "cefa6b9"}, "cmp-buffer": {"commit": "3022dbc"}} diff --git a/LVIM/modules/editor.org b/LVIM/modules/editor.org index 5d2416f8..c2c78d56 100644 --- a/LVIM/modules/editor.org +++ b/LVIM/modules/editor.org @@ -11,20 +11,6 @@ } #+end_src - + CONFIG - - #+begin_src lua - function config.vim_ctrlspace() - vim.api.nvim_create_autocmd("FileType", { - pattern = { "ctrlspace" }, - callback = function() - vim.api.nvim_win_set_option(0, "winhighlight", "SignColumn:LvimFocusNormal") - end, - group = "LvimIDE", - }) - end - #+end_src - **  [[https://github.com/nvim-telescope/telescope.nvim][telescope.nvim]] + REQUIRES: diff --git a/LVIM/modules/ui.org b/LVIM/modules/ui.org index cd771219..fc3be1ef 100644 --- a/LVIM/modules/ui.org +++ b/LVIM/modules/ui.org @@ -50,6 +50,67 @@ end #+end_src +**  [[https://github.com/rcarriga/nvim-notify][nvim-notify]] + + + INIT + + #+begin_src lua + modules["rcarriga/nvim-notify"] = { + commit = funcs.get_commit("nvim-notify", plugins_snapshot), + after = "lvim-colorscheme", + config = ui_config.nvim_notify, + } + #+end_src + + + CONFIG + + #+begin_src lua + function config.nvim_notify() + local notify_status_ok, notify = pcall(require, "notify") + if not notify_status_ok then + return + end + notify.setup({ + icons = { + DEBUG = " ", + ERROR = " ", + INFO = " ", + TRACE = " ", + WARN = " ", + }, + stages = "fade", + on_open = function(win) + if vim.api.nvim_win_is_valid(win) then + vim.api.nvim_win_set_config(win, { + border = { " ", " ", " ", " ", " ", " ", " ", " " }, + zindex = 200, + }) + end + end, + }) + notify.print_history = function() + local color = { + DEBUG = "NotifyDEBUGTitle", + TRACE = "NotifyTRACETitle", + INFO = "NotifyINFOTitle", + WARN = "NotifyWARNTitle", + ERROR = "NotifyERRORTitle", + } + for _, m in ipairs(notify.history()) do + vim.api.nvim_echo({ + { vim.fn.strftime("%FT%T", m.time), "Identifier" }, + { " ", "Normal" }, + { m.level, color[m.level] or "Title" }, + { " ", "Normal" }, + { table.concat(m.message, " "), "Normal" }, + }, false, {}) + end + end + vim.cmd("command! Message :lua require('notify').print_history()") + vim.notify = notify + end + #+end_src + **  [[https://github.com/folke/noice.nvim][noice.nvim]] + INIT @@ -66,53 +127,40 @@ #+begin_src lua function config.noice_nvim() - local noice_config_status_ok, noice_config = pcall(require, "noice.config") - if not noice_config_status_ok then - return - end - local noice_hacks_status_ok, noice_hacks = pcall(require, "noice.hacks") - if not noice_hacks_status_ok then + local noice_status_ok, noice = pcall(require, "noice") + if not noice_status_ok then return end - local noice_commands_status_ok, noice_commands = pcall(require, "noice.commands") - if not noice_commands_status_ok then - return - end - local noice_router_status_ok, noice_router = pcall(require, "noice.router") - if not noice_router_status_ok then - return - end - local noice_ui_status_ok, noice_ui = pcall(require, "noice.ui") - if not noice_ui_status_ok then - return - end - noice_config.setup({ - debug = false, - throttle = 1000 / 30, + noice.setup({ cmdline = { - enabled = true, - menu = "popup", + view = "cmdline_popup", + opts = { buf_options = { filetype = "vim" } }, icons = { - ["/"] = { icon = " ", hl_group = "DiagnosticWarn" }, - ["?"] = { icon = " ", hl_group = "DiagnosticWarn" }, + ["/"] = { icon = " ", hl_group = "DiagnosticWarn" }, + ["?"] = { icon = " ", hl_group = "DiagnosticWarn" }, [":"] = { icon = " ", hl_group = "DiagnosticInfo", firstc = false }, }, }, - history = { - view = "split", - opts = { - enter = true, - }, - filter = { event = "msg_show", ["not"] = { kind = { "search_count", "echo" } } }, - }, views = { + popupmenu = { + zindex = 65, + position = "auto", + win_options = { + winhighlight = { + Normal = "NuiBody", + FloatBorder = "NuiBorder", + CursorLine = "PmenuSel", + PmenuMatch = "Special", + }, + }, + }, notify = { - render = "notify", + backend = "notify", level = vim.log.levels.INFO, replace = true, }, split = { - render = "split", + backend = "split", enter = false, relative = "editor", position = "bottom", @@ -124,8 +172,21 @@ winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", }, }, + vsplit = { + backend = "split", + enter = false, + relative = "editor", + position = "right", + size = "20%", + close = { + keys = { "q", "" }, + }, + win_options = { + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + }, + }, popup = { - render = "popup", + backend = "popup", close = { events = { "BufLeave" }, keys = { "q", "" }, @@ -142,7 +203,7 @@ }, }, cmdline = { - render = "popup", + backend = "popup", relative = "editor", position = { row = "100%", @@ -154,19 +215,20 @@ }, border = { " ", " ", " ", " ", " ", " ", " ", " " }, win_options = { - winhighlight = "Normal:MsgArea", + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", }, }, - fancy_cmdline = { - render = "popup", + cmdline_popup = { + backend = "popup", relative = "editor", - focusable = true, + focusable = false, + enter = false, + zindex = 60, position = { row = "50%", col = "50%", }, size = { - min_width = 60, width = "auto", height = "auto", }, @@ -174,11 +236,12 @@ style = { " ", " ", " ", " ", " ", " ", " ", " " }, padding = { 0, 1, 0, 1 }, text = { - top = " Command Line ", + top = " COMMAND LINE: ", }, }, win_options = { winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + cursorline = false, }, filter_options = { { @@ -186,7 +249,7 @@ opts = { border = { text = { - top = " Search ", + top = " SEARCH: ", }, }, win_options = { @@ -199,21 +262,15 @@ }, routes = { { - view = "fancy_cmdline", + view = "cmdline_popup", + filter = { event = "cmdline" }, + }, + { + view = "cmdline_popup", filter = { any = { - { event = "cmdline" }, { event = "msg_show", kind = "confirm" }, { event = "msg_show", kind = "confirm_sub" }, - { event = "msg_show", kind = { "echo", "echomsg", "" }, before_input = true }, - }, - }, - opts = { - filter_options = { - { - filter = { event = "cmdline" }, - opts = { buf_options = { filetype = "vim" } }, - }, }, }, }, @@ -225,14 +282,6 @@ }, }, }, - { - view = "virtualtext", - filter = { - event = "msg_show", - kind = "search_count", - }, - opts = { hl_group = "DiagnosticVirtualTextInfo" }, - }, { filter = { any = { @@ -250,32 +299,13 @@ }, opts = { buf_options = { filetype = "lua" }, replace = true }, }, - { - view = "notify", - filter = { - event = "msg_show", - kind = "emsg", - }, - opts = { level = vim.log.levels.ERROR, replace = false, title = "Error" }, - }, - { - view = "notify", - filter = { - event = "msg_show", - kind = "wmsg", - }, - opts = { level = vim.log.levels.WARN, replace = false, title = "Warning" }, - }, { view = "notify", filter = {}, + opts = { title = "LVIM IDE" }, }, }, }) - noice_hacks.setup() - noice_commands.setup() - noice_router.setup() - noice_ui.setup() end #+end_src @@ -517,13 +547,13 @@ marks = true, registers = true, presets = { - operators = false, - motions = false, - text_objects = false, - windows = false, - nav = false, - z = false, - g = false, + operators = true, + motions = true, + text_objects = true, + windows = true, + nav = true, + z = true, + g = true, }, spelling = { enabled = true, @@ -1641,67 +1671,6 @@ end #+end_src -**  [[https://github.com/rcarriga/nvim-notify][nvim-notify]] - - + INIT - - #+begin_src lua - modules["rcarriga/nvim-notify"] = { - commit = funcs.get_commit("nvim-notify", plugins_snapshot), - after = "lvim-colorscheme", - config = ui_config.nvim_notify, - } - #+end_src - - + CONFIG - - #+begin_src lua - function config.nvim_notify() - local notify_status_ok, notify = pcall(require, "notify") - if not notify_status_ok then - return - end - notify.setup({ - icons = { - DEBUG = " ", - ERROR = " ", - INFO = " ", - TRACE = " ", - WARN = " ", - }, - stages = "fade", - on_open = function(win) - if vim.api.nvim_win_is_valid(win) then - vim.api.nvim_win_set_config(win, { - border = { " ", " ", " ", " ", " ", " ", " ", " " }, - zindex = 200, - }) - end - end, - }) - notify.print_history = function() - local color = { - DEBUG = "NotifyDEBUGTitle", - TRACE = "NotifyTRACETitle", - INFO = "NotifyINFOTitle", - WARN = "NotifyWARNTitle", - ERROR = "NotifyERRORTitle", - } - for _, m in ipairs(notify.history()) do - vim.api.nvim_echo({ - { vim.fn.strftime("%FT%T", m.time), "Identifier" }, - { " ", "Normal" }, - { m.level, color[m.level] or "Title" }, - { " ", "Normal" }, - { table.concat(m.message, " "), "Normal" }, - }, false, {}) - end - end - vim.cmd("command! Message :lua require('notify').print_history()") - vim.notify = notify - end - #+end_src - **  [[https://github.com/lvim-tech/lvim-focus][lvim-focus]] + INIT diff --git a/README.org b/README.org index 47cc7d05..f0c625cf 100644 --- a/README.org +++ b/README.org @@ -4,9 +4,9 @@ LVIM IDE is a modular Neovim configuration written in LUA with full customization - Current version - 2.2.67 (2022-10-03) + Current version - 2.3.00 (2022-10-06) - 107 plugins + 108 plugins (startup time: ~92 ms) ** SCREENSHOTS diff --git a/lua/configs/base/init.lua b/lua/configs/base/init.lua index 14fcb59d..9251b11e 100644 --- a/lua/configs/base/init.lua +++ b/lua/configs/base/init.lua @@ -106,7 +106,7 @@ configs["base_ctrlspace_pre_config"] = function() vim.g.CtrlSpaceGlobCommand = "rg --files --follow --hidden -g '!{.git/*,node_modules/*,target/*,vendor/*}'" vim.g.CtrlSpaceIgnoredFiles = "\v(tmp|temp)[\\/]" vim.g.CtrlSpaceSymbols = { - CS = " ", + CS = "", Sin = "", All = "", Vis = "★", diff --git a/lua/languages/base/languages/_configs.lua b/lua/languages/base/languages/_configs.lua index 9da0f2f3..fb68554e 100644 --- a/lua/languages/base/languages/_configs.lua +++ b/lua/languages/base/languages/_configs.lua @@ -120,12 +120,12 @@ M.lua = function(file_types, pid_name) }, hint = { enable = true, - -- arrayIndex = "All", - -- await = true, - -- paramName = "All", - -- paramType = true, - -- semicolon = "Disable", - -- setType = true, + arrayIndex = "All", + await = true, + paramName = "All", + paramType = true, + semicolon = "Disable", + setType = true, }, runtime = { version = "LuaJIT", diff --git a/lua/modules/base/configs/editor/init.lua b/lua/modules/base/configs/editor/init.lua index 09fe4acd..e4166204 100644 --- a/lua/modules/base/configs/editor/init.lua +++ b/lua/modules/base/configs/editor/init.lua @@ -1,15 +1,5 @@ local config = {} -function config.vim_ctrlspace() - vim.api.nvim_create_autocmd("FileType", { - pattern = { "ctrlspace" }, - callback = function() - vim.api.nvim_win_set_option(0, "winhighlight", "SignColumn:LvimFocusNormal") - end, - group = "LvimIDE", - }) -end - function config.telescope_nvim() local telescope_status_ok, telescope = pcall(require, "telescope") if not telescope_status_ok then diff --git a/lua/modules/base/configs/ui/init.lua b/lua/modules/base/configs/ui/init.lua index 7096295e..d96b2afe 100644 --- a/lua/modules/base/configs/ui/init.lua +++ b/lua/modules/base/configs/ui/init.lua @@ -19,6 +19,236 @@ function config.nui_nvim() vim.ui.select = require("configs.base.ui.select") end +function config.nvim_notify() + local notify_status_ok, notify = pcall(require, "notify") + if not notify_status_ok then + return + end + notify.setup({ + minimum_width = 80, + background_colour = "#20262A", + icons = { + DEBUG = " ", + ERROR = " ", + INFO = " ", + TRACE = " ", + WARN = " ", + }, + stages = "fade", + on_open = function(win) + if vim.api.nvim_win_is_valid(win) then + vim.api.nvim_win_set_config(win, { + border = { " ", " ", " ", " ", " ", " ", " ", " " }, + zindex = 200, + }) + vim.api.nvim_win_set_option(win, "wrap", true) + end + end, + }) + notify.print_history = function() + local color = { + DEBUG = "NotifyDEBUGTitle", + TRACE = "NotifyTRACETitle", + INFO = "NotifyINFOTitle", + WARN = "NotifyWARNTitle", + ERROR = "NotifyERRORTitle", + } + for _, m in ipairs(notify.history()) do + vim.api.nvim_echo({ + { vim.fn.strftime("%FT%T", m.time), "Identifier" }, + { " ", "Normal" }, + { m.level, color[m.level] or "Title" }, + { " ", "Normal" }, + { table.concat(m.message, " "), "Normal" }, + }, false, {}) + end + end + vim.cmd("command! Message :lua require('notify').print_history()") + vim.notify = notify +end + +function config.noice_nvim() + local noice_status_ok, noice = pcall(require, "noice") + if not noice_status_ok then + return + end + noice.setup({ + cmdline = { + view = "cmdline_popup", + opts = { buf_options = { filetype = "vim" } }, + icons = { + ["/"] = { icon = " ", hl_group = "DiagnosticWarn" }, + ["?"] = { icon = " ", hl_group = "DiagnosticWarn" }, + [":"] = { icon = " ", hl_group = "DiagnosticInfo", firstc = false }, + }, + }, + views = { + popupmenu = { + zindex = 65, + position = "auto", + win_options = { + winhighlight = { + Normal = "NuiBody", + FloatBorder = "NuiBorder", + CursorLine = "PmenuSel", + PmenuMatch = "Special", + }, + }, + }, + notify = { + backend = "notify", + level = vim.log.levels.INFO, + replace = true, + }, + split = { + backend = "split", + enter = false, + relative = "editor", + position = "bottom", + size = "20%", + close = { + keys = { "q", "" }, + }, + win_options = { + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + }, + }, + vsplit = { + backend = "split", + enter = false, + relative = "editor", + position = "right", + size = "20%", + close = { + keys = { "q", "" }, + }, + win_options = { + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + }, + }, + popup = { + backend = "popup", + close = { + events = { "BufLeave" }, + keys = { "q", "" }, + }, + enter = true, + border = { " ", " ", " ", " ", " ", " ", " ", " " }, + position = "50%", + size = { + width = "80%", + height = "60%", + }, + win_options = { + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + }, + }, + cmdline = { + backend = "popup", + relative = "editor", + position = { + row = "100%", + col = 0, + }, + size = { + height = "auto", + width = "100%", + }, + border = { " ", " ", " ", " ", " ", " ", " ", " " }, + win_options = { + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + }, + }, + cmdline_popup = { + backend = "popup", + relative = "editor", + focusable = false, + enter = false, + zindex = 60, + position = { + row = "50%", + col = "50%", + }, + size = { + width = "auto", + height = "auto", + }, + border = { + style = { " ", " ", " ", " ", " ", " ", " ", " " }, + padding = { 0, 1, 0, 1 }, + text = { + top = " COMMAND LINE: ", + }, + }, + win_options = { + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + cursorline = false, + }, + filter_options = { + { + filter = { event = "cmdline", find = "^%s*[/?]" }, + opts = { + border = { + text = { + top = " SEARCH: ", + }, + }, + win_options = { + winhighlight = "Normal:NuiBody,FloatBorder:NuiBorder", + }, + }, + }, + }, + }, + }, + routes = { + { + view = "cmdline_popup", + filter = { event = "cmdline" }, + }, + { + view = "cmdline_popup", + filter = { + any = { + { event = "msg_show", kind = "confirm" }, + { event = "msg_show", kind = "confirm_sub" }, + }, + }, + }, + { + view = "split", + filter = { + any = { + { event = "msg_history_show" }, + }, + }, + }, + { + filter = { + any = { + { event = { "msg_showmode", "msg_showcmd", "msg_ruler" } }, + { event = "msg_show", kind = "search_count" }, + }, + }, + opts = { skip = true }, + }, + { + view = "notify", + filter = { + event = "noice", + kind = { "stats", "debug" }, + }, + opts = { buf_options = { filetype = "lua" }, replace = true }, + }, + { + view = "notify", + filter = {}, + opts = { title = "LVIM IDE" }, + }, + }, + }) +end + function config.alpha_nvim() local alpha_status_ok, alpha = pcall(require, "alpha") if not alpha_status_ok then @@ -180,13 +410,13 @@ function config.which_key_nvim() marks = true, registers = true, presets = { - operators = false, - motions = false, - text_objects = false, - windows = false, - nav = false, - z = false, - g = false, + operators = true, + motions = true, + text_objects = true, + windows = true, + nav = true, + z = true, + g = true, }, spelling = { enabled = true, @@ -235,8 +465,7 @@ function config.which_key_nvim() "^:", "^ ", }, - show_help = true, - buftype = "", + show_help = false, } local nopts = { mode = "n", @@ -1190,52 +1419,6 @@ function config.indent_blankline_nvim() }) end -function config.nvim_notify() - local notify_status_ok, notify = pcall(require, "notify") - if not notify_status_ok then - return - end - notify.setup({ - background_colour = "#20262A", - icons = { - DEBUG = " ", - ERROR = " ", - INFO = " ", - TRACE = " ", - WARN = " ", - }, - stages = "fade", - on_open = function(win) - if vim.api.nvim_win_is_valid(win) then - vim.api.nvim_win_set_config(win, { - border = { " ", " ", " ", " ", " ", " ", " ", " " }, - zindex = 200, - }) - end - end, - }) - notify.print_history = function() - local color = { - DEBUG = "NotifyDEBUGTitle", - TRACE = "NotifyTRACETitle", - INFO = "NotifyINFOTitle", - WARN = "NotifyWARNTitle", - ERROR = "NotifyERRORTitle", - } - for _, m in ipairs(notify.history()) do - vim.api.nvim_echo({ - { vim.fn.strftime("%FT%T", m.time), "Identifier" }, - { " ", "Normal" }, - { m.level, color[m.level] or "Title" }, - { " ", "Normal" }, - { table.concat(m.message, " "), "Normal" }, - }, false, {}) - end - end - vim.cmd("command! Message :lua require('notify').print_history()") - vim.notify = notify -end - function config.lvim_focus() require("lvim-focus").setup({ colorcolumn = true, diff --git a/lua/modules/base/init.lua b/lua/modules/base/init.lua index 3785b020..eb62f29c 100644 --- a/lua/modules/base/init.lua +++ b/lua/modules/base/init.lua @@ -38,6 +38,18 @@ modules["MunifTanjim/nui.nvim"] = { config = ui_config.nui_nvim, } +modules["rcarriga/nvim-notify"] = { + commit = funcs.get_commit("nvim-notify", plugins_snapshot), + after = "lvim-colorscheme", + config = ui_config.nvim_notify, +} + +modules["folke/noice.nvim"] = { + commit = funcs.get_commit("noice.nvim", plugins_snapshot), + event = "VimEnter", + config = ui_config.noice_nvim, +} + modules["goolord/alpha-nvim"] = { commit = funcs.get_commit("alpha-nvim", plugins_snapshot), event = "VimEnter", @@ -138,12 +150,6 @@ modules["lukas-reineke/indent-blankline.nvim"] = { config = ui_config.indent_blankline_nvim, } -modules["rcarriga/nvim-notify"] = { - commit = funcs.get_commit("nvim-notify", plugins_snapshot), - after = "lvim-colorscheme", - config = ui_config.nvim_notify, -} - modules["lvim-tech/lvim-focus"] = { commit = funcs.get_commit("lvim-focus", plugins_snapshot), after = "lvim-colorscheme",