From d31de18bd0b25712797e0143e187dbc4839325f8 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 7 Sep 2023 22:11:04 +0200 Subject: [PATCH 1/5] add eunuch for sudo stuff --- lua/plex/plugins/extras/editor/vim-eunuch.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lua/plex/plugins/extras/editor/vim-eunuch.lua diff --git a/lua/plex/plugins/extras/editor/vim-eunuch.lua b/lua/plex/plugins/extras/editor/vim-eunuch.lua new file mode 100644 index 0000000..c767058 --- /dev/null +++ b/lua/plex/plugins/extras/editor/vim-eunuch.lua @@ -0,0 +1,12 @@ +return { + { + -- enables UNIX specific stuff in vim, + -- specifically: + -- :SudoWrite + -- :SudoRead + -- :Chmod + -- and also some more, but those are easy done with shell + "tpope/vim-eunuch", + lazy=false, + } +} -- 2.40.1 From b58b02b54630d746548b4fb1cc996916a60fd297 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 7 Sep 2023 22:28:08 +0200 Subject: [PATCH 2/5] suda usage --- lua/plex/config/options.lua | 2 ++ lua/plex/plugins/editor.lua | 2 +- lua/plex/plugins/extras/editor/vim-eunuch.lua | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plex/config/options.lua b/lua/plex/config/options.lua index b1364d8..11aef7e 100644 --- a/lua/plex/config/options.lua +++ b/lua/plex/config/options.lua @@ -213,6 +213,8 @@ vim.g.loaded_node_provider = 0 vim.g.no_gitrebase_maps = 1 -- See share/nvim/runtime/ftplugin/gitrebase.vim vim.g.no_man_maps = 1 -- See share/nvim/runtime/ftplugin/man.vim +vim.g.suda_smart_edit = 1 -- smart suda open and write + -- Filetype detection -- === diff --git a/lua/plex/plugins/editor.lua b/lua/plex/plugins/editor.lua index b8ead1b..c1a0f6e 100644 --- a/lua/plex/plugins/editor.lua +++ b/lua/plex/plugins/editor.lua @@ -8,7 +8,7 @@ return { ----------------------------------------------------------------------------- { 'nmac427/guess-indent.nvim', lazy = false, priority = 50, config = true }, { 'tweekmonster/helpful.vim', cmd = 'HelpfulVersion' }, - { 'lambdalisue/suda.vim', event = 'BufRead' }, + { 'lambdalisue/suda.vim', lazy = false, event = 'BufRead' }, ----------------------------------------------------------------------------- { diff --git a/lua/plex/plugins/extras/editor/vim-eunuch.lua b/lua/plex/plugins/extras/editor/vim-eunuch.lua index c767058..2dfd252 100644 --- a/lua/plex/plugins/extras/editor/vim-eunuch.lua +++ b/lua/plex/plugins/extras/editor/vim-eunuch.lua @@ -7,6 +7,7 @@ return { -- :Chmod -- and also some more, but those are easy done with shell "tpope/vim-eunuch", + enabled = false, lazy=false, } } -- 2.40.1 From d8fd81ba736dcc4ad2931c57ec11fcd06cce0b12 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 8 Sep 2023 11:35:08 +0200 Subject: [PATCH 3/5] fancy fancy logo in dash --- lua/plex/plugins/extras/treesitter/treesj.lua | 2 ++ lua/plex/plugins/extras/ui/dashboard.lua | 34 ++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lua/plex/plugins/extras/treesitter/treesj.lua b/lua/plex/plugins/extras/treesitter/treesj.lua index 0cc6162..fd8ba6f 100644 --- a/lua/plex/plugins/extras/treesitter/treesj.lua +++ b/lua/plex/plugins/extras/treesitter/treesj.lua @@ -1,6 +1,8 @@ return { { 'Wansmer/treesj', + enabled = true, + lazy = false, cmd = { 'TSJJoin', 'TSJSplit' }, keys = { { 'sj', 'TSJJoin' }, diff --git a/lua/plex/plugins/extras/ui/dashboard.lua b/lua/plex/plugins/extras/ui/dashboard.lua index 1900ac8..4e61881 100644 --- a/lua/plex/plugins/extras/ui/dashboard.lua +++ b/lua/plex/plugins/extras/ui/dashboard.lua @@ -1,3 +1,20 @@ +local function get_header() + -- see https://github.com/MaximilianLloyd/ascii.nvim + return { + -- The following is a customized version! + [[ ]], + [[  ]], + [[ █ ███████ █████ ██ ]], + [[ ███ █████ █████  ]], + [[ █████ ███ ███████████████████ ███ ███████████ ]], + [[ ██ ██ █ ███ █████████████ █████ ██████████████ ]], + [[ ████ ████ ██████████ █████████ █████ █████ ████ █████ ]], + [[ ██████ ██ ███ ███ █████████ █████ █████ ████ █████ ]], + [[ ████████  ██████████████████ ████ █████ █████ ████ ██████ ]], + [[ ]], + } +end + return { { 'glepnir/dashboard-nvim', @@ -7,11 +24,9 @@ return { theme = 'hyper', config = { - header = { - foo = "bar", - }, + header = get_header(), week_header = { - enable = true, + enable = false, }, shortcut = { { @@ -50,6 +65,17 @@ return { key = 's', }, }, + + project = { + enable = true, + limit = 8, + icon = '', + label = ' Projects', + action = 'Telescope find_files cwd=' + }, + packages = { enable = true}, + mru = { limit = 10, icon = '', label = ' Last Edited'}, + -- footer = { 'footer bar foo' }, }, }) -- 2.40.1 From fe23da711a9c039152e4b72e4cafae04b0946f3e Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 8 Sep 2023 16:13:02 +0200 Subject: [PATCH 4/5] dont go up on split line --- lua/plex/config/keymaps.lua | 2 +- spell/en.utf-8.add | 2 ++ spell/en.utf-8.add.spl | Bin 371 -> 415 bytes 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plex/config/keymaps.lua b/lua/plex/config/keymaps.lua index d4f80b9..887b208 100644 --- a/lua/plex/config/keymaps.lua +++ b/lua/plex/config/keymaps.lua @@ -121,7 +121,7 @@ map('i', '', 'o', { desc = 'Start Newline' }) -- Split and join lines map('n', 'jj', ':join', { desc = 'Join lines', silent = true }) -map('n', 'ss', 'ik', { desc = 'Split lines', silent = true }) +map('n', 'ss', 'i', { desc = 'Split lines', silent = true }) -- Re-select blocks after indenting in visual/select mode map('x', '<', '4@PK7_kJ5foRYtLo`}hOV-Kz3`1IaM=J~a?NO-Kp@jIqUEq=yC{7V z?YVM}oxRp_POL6Z(ffB0k=xb&aC{;>;W7Us!QO%uTVfYHbGMsg?QuWL6*Y+>|K@T_ ArT_o{ literal 371 zcmXX?%TB{E5Zqby3gtI)Md}}v14s=Ls(KHOxu@gnR_U_EiPJDVi z#L;?x|0g29H;rjs_vSDCIE4gJ69JK14}%UCp;Upl83RT{=nsoafgE!tx7t`D-8y6N zUSL&xqQwW<(1)P z2i=eu`JM5~@Qh5L-8&kvY Date: Fri, 8 Sep 2023 16:25:02 +0200 Subject: [PATCH 5/5] go to end after join --- lua/plex/config/keymaps.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plex/config/keymaps.lua b/lua/plex/config/keymaps.lua index 887b208..c218c88 100644 --- a/lua/plex/config/keymaps.lua +++ b/lua/plex/config/keymaps.lua @@ -120,8 +120,10 @@ map('n', 'o', 'o', { desc = 'Insert newline below' }) map('i', '', 'o', { desc = 'Start Newline' }) -- Split and join lines -map('n', 'jj', ':join', { desc = 'Join lines', silent = true }) +map('n', 'jj', ':joing$', { desc = 'Join lines', silent = true }) +map('n', 'jJ', 'k:joinj', { desc = 'Join lines', silent = true }) map('n', 'ss', 'i', { desc = 'Split lines', silent = true }) +map('n', 'sS', 'ik', { desc = 'Split lines', silent = true }) -- Re-select blocks after indenting in visual/select mode map('x', '<', '