From bd80dcc2a583c1932f45c526e2d7b76c015f47d1 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 6 Sep 2023 15:44:20 +0200 Subject: [PATCH] working dashboard --- lua/plex/plugins/editor.lua | 1 + lua/plex/plugins/extras/lang/go.lua | 106 +++++++++++------------ lua/plex/plugins/extras/ui/dashboard.lua | 53 ++++++++++++ spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 38 -> 51 bytes 5 files changed, 108 insertions(+), 53 deletions(-) create mode 100644 lua/plex/plugins/extras/ui/dashboard.lua diff --git a/lua/plex/plugins/editor.lua b/lua/plex/plugins/editor.lua index fcdb4a8..fb8b6df 100644 --- a/lua/plex/plugins/editor.lua +++ b/lua/plex/plugins/editor.lua @@ -30,6 +30,7 @@ return { ----------------------------------------------------------------------------- { 'olimorris/persisted.nvim', + enabled = false, event = 'VimEnter', priority = 1000, opts = { diff --git a/lua/plex/plugins/extras/lang/go.lua b/lua/plex/plugins/extras/lang/go.lua index a8c89fb..ba12e5a 100644 --- a/lua/plex/plugins/extras/lang/go.lua +++ b/lua/plex/plugins/extras/lang/go.lua @@ -37,59 +37,59 @@ return { 'neovim/nvim-lspconfig', opts = { servers = { - gopls = { - settings = { - -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md - gopls = { - gofumpt = true, - usePlaceholders = true, - completeUnimported = true, - staticcheck = true, - directoryFilters = { - '-.git', - '-.vscode', - '-.idea', - '-.vscode-test', - '-node_modules', - }, - semanticTokens = true, - codelenses = { - gc_details = false, - generate = true, - regenerate_cgo = true, - run_govulncheck = true, - test = true, - tidy = true, - upgrade_dependency = true, - vendor = true, - }, - hints = { - assignVariableTypes = true, - compositeLiteralFields = true, - compositeLiteralTypes = true, - constantValues = true, - functionTypeParameters = true, - parameterNames = true, - rangeVariableTypes = true, - }, - -- https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md - analyses = { - fieldalignment = true, - nilness = true, - unusedparams = true, - unusedwrite = true, - useany = true, - -- fillreturns = true, - -- nonewvars = true, - -- shadow = true, - -- undeclaredname = true, - -- unusedvariable = true, - -- ST1000 = false, - -- ST1005 = false, - }, - }, - }, - }, + -- gopls = { + -- settings = { + -- -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md + -- gopls = { + -- gofumpt = true, + -- usePlaceholders = true, + -- completeUnimported = true, + -- staticcheck = true, + -- directoryFilters = { + -- '-.git', + -- '-.vscode', + -- '-.idea', + -- '-.vscode-test', + -- '-node_modules', + -- }, + -- semanticTokens = true, + -- codelenses = { + -- gc_details = false, + -- generate = true, + -- regenerate_cgo = true, + -- run_govulncheck = true, + -- test = true, + -- tidy = true, + -- upgrade_dependency = true, + -- vendor = true, + -- }, + -- hints = { + -- assignVariableTypes = true, + -- compositeLiteralFields = true, + -- compositeLiteralTypes = true, + -- constantValues = true, + -- functionTypeParameters = true, + -- parameterNames = true, + -- rangeVariableTypes = true, + -- }, + -- -- https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md + -- analyses = { + -- fieldalignment = true, + -- nilness = true, + -- unusedparams = true, + -- unusedwrite = true, + -- useany = true, + -- -- fillreturns = true, + -- -- nonewvars = true, + -- -- shadow = true, + -- -- undeclaredname = true, + -- -- unusedvariable = true, + -- -- ST1000 = false, + -- -- ST1005 = false, + -- }, + -- }, + -- }, + -- }, }, setup = { gopls = function(_, _) diff --git a/lua/plex/plugins/extras/ui/dashboard.lua b/lua/plex/plugins/extras/ui/dashboard.lua new file mode 100644 index 0000000..3581923 --- /dev/null +++ b/lua/plex/plugins/extras/ui/dashboard.lua @@ -0,0 +1,53 @@ +return { + { + 'glepnir/dashboard-nvim', + event = 'VimEnter', + config = function() + require('dashboard').setup({ + + theme = 'hyper', + config = { + header = { + foo = "bar", + }, + week_header = { + enable = true, + }, + shortcut = { + { + desc = '󰊳 Update', + group = '@property', + action = 'Lazy update', + key = 'u' + }, + { + icon = ' ', + icon_hl = '@variable', + desc = 'Files', + group = 'Label', + action = 'Telescope find_files', + key = 'f', + }, + { + desc = ' Git', + group = 'Label', + action = function() + local Util = require('plex.lib.utils') + Util.float_term({ 'lazygit'}, { cwd = Util.get_root() }) + end, + key = 'g', + }, + { + desc = ' Neorg', + group = 'Number', + action = 'Neorg workspace main', + key = 'o', + }, + }, + }, + + }) + end, + dependencies = { {'nvim-tree/nvim-web-devicons'}} + } +} diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index fe394af..fbf6abc 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -1,2 +1,3 @@ #ifferent Linter +Neorg diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 17f2be92e1560a22dc875258cb002caa5fa1b168..7a2235597b9c6d44fa11044df6291edfae4018f4 100644 GIT binary patch literal 51 ycmWIZ^erw(&B-zP&%nSS&XkkKn8}#OSi+dfSj5Q01f=qT3`Pb9-gKZm1ONa&>