From f9f90fc6a45ee30fc4fe2a4612c172fc9d521924 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 Feb 2023 23:42:49 +0200 Subject: Add Trouble toggle for the plugin --- lua/user/keys.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/user/keys.lua b/lua/user/keys.lua index 176593c..900e98a 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -284,3 +284,6 @@ map("n", "zm", "ZenMode | :echom ('Zen Mode') | :sl! | echo -- Vim-rooter map("n", "ro", "Rooter | :echom ('cd to root/project directory') | :sl! | echo ('')", term_opts) + +-- Trouble (UI to show diagnostics) +map("n", "t", "TroubleToggle") -- cgit v1.2.3 From 4c28328abe07ec42532a3e9aefe41c7ea10959dc Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 Feb 2023 23:51:42 +0200 Subject: Add even more Trouble keybindings --- lua/user/keys.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/user/keys.lua b/lua/user/keys.lua index 900e98a..7496b65 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -287,3 +287,8 @@ map("n", "ro", "Rooter | :echom ('cd to root/project directory' -- Trouble (UI to show diagnostics) map("n", "t", "TroubleToggle") +map("n", "tw", "TroubleToggle workspace_diagnostics") +map("n", "td", "TroubleToggle document_diagnostics") +map("n", "tq", "TroubleToggle quickfix") +map("n", "tl", "TroubleToggle loclist") +map("n", "gR", "TroubleToggle lsp_references") -- cgit v1.2.3 From 6d0c00b30135686345a258308cd4163e8d61cf33 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 Feb 2023 23:54:29 +0200 Subject: Replaced alpha.nvim with dashboard.nvim --- lua/plugins/dashboard.lua | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lua/plugins/dashboard.lua diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua new file mode 100644 index 0000000..8cc31df --- /dev/null +++ b/lua/plugins/dashboard.lua @@ -0,0 +1,4 @@ +require('dashboard').setup { + -- config +} + -- cgit v1.2.3 From 958e000b9ee14b0faa323eec55b639c22a7707a9 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 Feb 2023 23:56:19 +0200 Subject: Add trouble conf to load file --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index f6b6ed5..429f78e 100644 --- a/init.lua +++ b/init.lua @@ -74,6 +74,7 @@ local modules = { "plugins.colorscheme", "plugins.heirline", "plugins.toggleterm", + "plugins.trouble" --"plugins.modify-blend", --"plugins.dap", --"plugins.floatterm", -- cgit v1.2.3 From 94771f76f360f158a96b2776f75cb3b47b56abf0 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 Feb 2023 23:56:55 +0200 Subject: Add dashboard conf to load file --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 429f78e..22ff27a 100644 --- a/init.lua +++ b/init.lua @@ -74,7 +74,8 @@ local modules = { "plugins.colorscheme", "plugins.heirline", "plugins.toggleterm", - "plugins.trouble" + "plugins.trouble", + "plugins.dashboard", --"plugins.modify-blend", --"plugins.dap", --"plugins.floatterm", -- cgit v1.2.3 From 8e091c44d534a7b5cee8992d093494b0f898ae76 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 Feb 2023 23:58:11 +0200 Subject: Replaced alpha with dashboard --- lua/user/pack.lua | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lua/user/pack.lua b/lua/user/pack.lua index 696309e..e6fdc73 100644 --- a/lua/user/pack.lua +++ b/lua/user/pack.lua @@ -180,12 +180,22 @@ return packer.startup(function(use) -- UI use("kyazdani42/nvim-web-devicons") -- use("onsails/lspkind-nvim") -- + --use({ + -- 'goolord/alpha-nvim', + -- requires = { 'nvim-tree/nvim-web-devicons' }, + -- config = function () + -- require'alpha'.setup(require'alpha.themes.startify'.config) + -- end + --}) use({ - 'goolord/alpha-nvim', - requires = { 'nvim-tree/nvim-web-devicons' }, - config = function () - require'alpha'.setup(require'alpha.themes.startify'.config) - end + 'glepnir/dashboard-nvim', + event = 'VimEnter', + config = function() + require('dashboard').setup { + -- config + } + end, + requires = {'nvim-tree/nvim-web-devicons'} }) use("rcarriga/nvim-notify") -- Notification plugin use("karb94/neoscroll.nvim") -- Faster/smooth scrolling -- cgit v1.2.3 From be1f0b462c275e5ce92cab042621b71901a756a3 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 16 Feb 2023 23:58:20 +0200 Subject: Add trouble conf --- lua/plugins/trouble.lua | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 lua/plugins/trouble.lua diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua new file mode 100644 index 0000000..d4f50dc --- /dev/null +++ b/lua/plugins/trouble.lua @@ -0,0 +1,47 @@ +require("trouble").setup { + position = "bottom", -- position of the list can be: bottom, top, left, right + height = 10, -- height of the trouble list when position is top or bottom + width = 50, -- width of the list when position is left or right + icons = true, -- use devicons for filenames + mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" + fold_open = "", -- icon used for open folds + fold_closed = "", -- icon used for closed folds + group = true, -- group results by file + padding = true, -- add an extra new line on top of the list + action_keys = { -- key mappings for actions in the trouble list + -- map to {} to remove a mapping, for example: + -- close = {}, + close = "q", -- close the list + cancel = "", -- cancel the preview and get back to your last window / buffer / cursor + refresh = "r", -- manually refresh + jump = {"", ""}, -- jump to the diagnostic or open / close folds + open_split = { "" }, -- open buffer in new split + open_vsplit = { "" }, -- open buffer in new vsplit + open_tab = { "" }, -- open buffer in new tab + jump_close = {"o"}, -- jump to the diagnostic and close the list + toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode + toggle_preview = "P", -- toggle auto_preview + hover = "K", -- opens a small popup with the full multiline message + preview = "p", -- preview the diagnostic location + close_folds = {"zM", "zm"}, -- close all folds + open_folds = {"zR", "zr"}, -- open all folds + toggle_fold = {"zA", "za"}, -- toggle fold of current file + previous = "k", -- previous 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_preview = true, -- automatically preview the location of the diagnostic. 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 + signs = { + -- icons / text used for a diagnostic + error = "", + warning = "", + hint = "", + information = "", + other = "" + }, + use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client +} -- cgit v1.2.3 From 54bebc5e7efda92e636e25c77114b192d7c90546 Mon Sep 17 00:00:00 2001 From: srdusr Date: Fri, 17 Feb 2023 23:47:22 +0200 Subject: Improved looks and functionality --- lua/plugins/dashboard.lua | 66 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua index 8cc31df..7eb4814 100644 --- a/lua/plugins/dashboard.lua +++ b/lua/plugins/dashboard.lua @@ -1,4 +1,64 @@ -require('dashboard').setup { - -- config -} +local db = require("dashboard") +--vim.api.nvim_create_autocmd("VimEnter", { +-- callback = function() +-- -- disable line numbers +-- vim.opt_local.number = false +-- vim.opt_local.relativenumber = false +-- -- always start in insert mode +-- end, +--}) +db.setup({ + theme = "hyper", + config = { + header = { + [[ ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗]], + [[ ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║]], + [[ ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║]], + [[ ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║]], + [[ ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║]], + [[ ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝]], + }, + disable_move = true, + shortcut = { + { desc = " Plugins", group = "@property", action = "PackerStatus", key = "p" }, + { + desc = " Files", + group = "Label", + action = "Telescope find_files", + key = "f", + }, + { + desc = " Text", + group = "DiagnosticHint", + action = "Telescope live_grep", + key = "t", + }, + { + desc = " Scheme", + group = "Number", + action = "Telescope colorscheme", + key = "s", + }, + }, + }, + hide = { + statusline = false, + tabline = false, + winbar = false, + }, + -- preview = { +-- command, -- preview command +-- file_path, -- preview file path +-- file_height, -- preview file height +-- file_width, -- preview file width +-- }, +-- footer = {} --your footer +}) +--vim.cmd([[ +-- autocmd FileType dashboard :highlight DashboardHeader guifg='#b2b2b2' +-- autocmd FileType dashboard :highlight DashboardCenter guifg='#5f8700' +-- autocmd FileType dashboard :highlight DashboardCenterIcon guifg='#0087af' +-- autocmd FileType dashboard :highlight DashboardShortCut guifg='#ffd7ff' +-- autocmd FileType dashboard :highlight DashboardFooter guifg='#878787' +--]]) -- cgit v1.2.3 From 16eeb0e4194d2dc0b13197e1dffb7afd06241c8c Mon Sep 17 00:00:00 2001 From: srdusr Date: Fri, 17 Feb 2023 23:48:39 +0200 Subject: Add dashboard to 'local SpecialStatusline' --- lua/plugins/heirline.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/plugins/heirline.lua b/lua/plugins/heirline.lua index 47ffe18..6c05e28 100644 --- a/lua/plugins/heirline.lua +++ b/lua/plugins/heirline.lua @@ -792,7 +792,7 @@ local SpecialStatusline = { condition = function() return conditions.buffer_matches({ buftype = { "nofile", "prompt", "help", "quickfix" }, - filetype = { "^git.*", "fugitive" }, + filetype = { "^git.*", "fugitive", "dashboard", }, }) end, @@ -801,7 +801,6 @@ local SpecialStatusline = { --Align, { ViMode, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, { LeftSpace, hl = { bg = utils.get_highlight("statusline").bg, force = true } }, - { FileType, hl = { bg = utils.get_highlight("statusline").bg, force = true } }, { Space, hl = { bg = utils.get_highlight("statusline").bg, force = true } }, { Align, hl = { bg = utils.get_highlight("statusline").bg, force = true } }, { RightSpace, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, @@ -979,7 +978,7 @@ local Center = { condition = function() return conditions.buffer_matches({ buftype = { "nofile", "prompt", "help", "quickfix" }, - filetype = { "^git.*", "fugitive" }, + filetype = { "^git.*", "fugitive", "dashboard", }, }) end, init = function() -- cgit v1.2.3 From 53a6aa43b8e187e45fdf8ab1b38c07ef3e017615 Mon Sep 17 00:00:00 2001 From: srdusr Date: Fri, 17 Feb 2023 23:51:15 +0200 Subject: Exclude 'glepnir/dashboard-nvim' from 'myusuf3/numbers.vim' (Removed line numbers from showing in dashboard --- lua/user/pack.lua | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/lua/user/pack.lua b/lua/user/pack.lua index e6fdc73..65b475b 100644 --- a/lua/user/pack.lua +++ b/lua/user/pack.lua @@ -126,7 +126,9 @@ return packer.startup(function(use) --use("tpope/vim-unimpaired") -- --use("vimpostor/vim-tpipeline") -- use("nathom/filetype.nvim") -- - use("myusuf3/numbers.vim") -- + use({"myusuf3/numbers.vim", -- + vim.cmd("let g:numbers_exclude = ['dashboard']") + }) use("windwp/nvim-autopairs") -- use("numToStr/Comment.nvim") -- use("akinsho/toggleterm.nvim") -- @@ -152,13 +154,6 @@ return packer.startup(function(use) use({ "folke/trouble.nvim", requires = "nvim-tree/nvim-web-devicons", - config = function() - require("trouble").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - end }) use("airblade/vim-rooter") -- --use("vim-test/vim-test") -- @@ -190,11 +185,6 @@ return packer.startup(function(use) use({ 'glepnir/dashboard-nvim', event = 'VimEnter', - config = function() - require('dashboard').setup { - -- config - } - end, requires = {'nvim-tree/nvim-web-devicons'} }) use("rcarriga/nvim-notify") -- Notification plugin -- cgit v1.2.3