From 9c81e94e1ff930dd7fa0f0dee612a197b85eb747 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Fri, 8 Jul 2022 14:07:53 +0200 Subject: [PATCH] feat: convert NeoVim configuration to Lua --- .gitignore | 1 + hammerspoon/caffeine.lua | 22 +- hammerspoon/functions.lua | 158 +- hammerspoon/init.lua | 171 +- nvim/after/plugin/abolish.vim | 1 + nvim/autocmd.vim | 108 - nvim/functions.vim | 35 - nvim/init.lua | 38 + nvim/init.vim | 6 - nvim/lua/kogakure/alpha.lua | 35 + nvim/lua/kogakure/autocommands.lua | 117 + nvim/lua/kogakure/autopairs.lua | 34 + nvim/lua/kogakure/blamer.lua | 10 + nvim/lua/kogakure/bufferline.lua | 71 + nvim/lua/kogakure/cmp.lua | 139 + nvim/lua/kogakure/colorizer.lua | 21 + nvim/lua/kogakure/colorscheme.lua | 13 + nvim/lua/kogakure/comment.lua | 23 + nvim/lua/kogakure/cursorline.lua | 18 + nvim/lua/kogakure/export-to-vscode.lua | 6 + nvim/lua/kogakure/functions.lua | 51 + nvim/lua/kogakure/fzf.lua | 44 + nvim/lua/kogakure/gitsigns.lua | 49 + .../goyo.vim => lua/kogakure/goyo.lua} | 10 +- nvim/lua/kogakure/harpoon.lua | 18 + nvim/lua/kogakure/impatient.lua | 7 + nvim/lua/kogakure/indentline.lua | 24 + nvim/lua/kogakure/keymaps.lua | 130 + nvim/lua/kogakure/lsp/configs.lua | 50 + nvim/lua/kogakure/lsp/handlers.lua | 126 + nvim/lua/kogakure/lsp/init.lua | 10 + nvim/lua/kogakure/lsp/lightbulb.lua | 11 + nvim/lua/kogakure/lsp/null-ls.lua | 48 + nvim/lua/kogakure/lsp/settings/jsonls.lua | 211 + nvim/lua/kogakure/lsp/settings/pyright.lua | 9 + .../lua/kogakure/lsp/settings/sumneko_lua.lua | 15 + nvim/lua/kogakure/lsp/trouble.lua | 8 + nvim/lua/kogakure/lualine.lua | 35 + nvim/lua/kogakure/neoscroll.lua | 7 + nvim/lua/kogakure/nvim-tree.lua | 7 + nvim/lua/kogakure/options.lua | 84 + nvim/lua/kogakure/plugins.lua | 168 + nvim/lua/kogakure/project.lua | 32 + nvim/lua/kogakure/spectre.lua | 7 + nvim/lua/kogakure/speeddating.lua | 4 + nvim/lua/kogakure/telescope.lua | 170 + nvim/lua/kogakure/text-objects.lua | 80 + nvim/lua/kogakure/toggleterm.lua | 98 + nvim/lua/kogakure/treesitter.lua | 32 + nvim/lua/kogakure/vim-easymotion.lua | 12 + nvim/lua/kogakure/vim-gh-line.lua | 3 + nvim/lua/kogakure/vimux.lua | 15 + nvim/lua/kogakure/whichkey.lua | 257 + nvim/mappings.vim | 137 - nvim/plugin-config.vim | 36 - nvim/plugin-config/autopairs.lua | 9 - nvim/plugin-config/base16.vim | 7 - nvim/plugin-config/blamer.vim | 9 - nvim/plugin-config/bookmarks.vim | 5 - nvim/plugin-config/bufferline.lua | 55 - nvim/plugin-config/cmp.lua | 53 - nvim/plugin-config/colorizer.lua | 17 - nvim/plugin-config/diagnosticls-configs.lua | 53 - nvim/plugin-config/export-to-vscode.lua | 4 - nvim/plugin-config/fugitive.vim | 6 - nvim/plugin-config/fzf.lua | 25 - nvim/plugin-config/gitsigns.lua | 7 - nvim/plugin-config/harpoon.lua | 17 - nvim/plugin-config/lsp-config.vim | 21 - nvim/plugin-config/lsp-installer.lua | 63 - nvim/plugin-config/lspkind.lua | 7 - nvim/plugin-config/lualine.lua | 41 - nvim/plugin-config/neoformat.vim | 18 - nvim/plugin-config/neoscroll.lua | 7 - nvim/plugin-config/pandoc.vim | 6 - nvim/plugin-config/prettier.vim | 18 - nvim/plugin-config/sidebar.lua | 9 - nvim/plugin-config/speeddating.vim | 4 - nvim/plugin-config/telescope.lua | 86 - nvim/plugin-config/tree.lua | 109 - nvim/plugin-config/treesitter.lua | 41 - nvim/plugin-config/trouble.lua | 12 - nvim/plugin-config/ultisnips.vim | 13 - nvim/plugin-config/vim-commentary.vim | 6 - nvim/plugin-config/vim-easymotion.vim | 10 - nvim/plugin-config/vim-gh-line.vim | 4 - nvim/plugin-config/vimux.vim | 14 - nvim/plugin-config/web-devicons.lua | 10 - nvim/plugins.vim | 117 - nvim/settings.vim | 83 - nvim/spell/de.utf-8.add | 200 - nvim/spell/de.utf-8.add.spl | Bin 2759 -> 57 bytes nvim/spell/de.utf-8.spl | Bin nvim/spell/de.utf-8.sug | Bin nvim/spell/en.utf-8.add | 9 - nvim/spell/en.utf-8.add.spl | Bin 182 -> 44 bytes nvim/spell/en.utf-8.spl | Bin nvim/spell/en.utf-8.sug | Bin nvim/thesaurus/de_openthesaurus.txt | 4760 ++++++++--------- nvim/thesaurus/de_user.txt | 4 +- nvim/ultisnips/javascript.snippets | 170 - setup/brew.sh | 8 + setup/gem.sh | 1 + setup/init.sh | 6 + setup/lua.sh | 3 + setup/npm.sh | 8 +- setup/python.sh | 26 +- setup/rust.sh | 3 + tmux.conf | 14 +- ...ml => website-hamburg-stefanimhoff-de.yml} | 2 +- ...ogakure.de.yml => website-kogakure-de.yml} | 2 +- ...off.de.yml => website-stefanimhoff-de.yml} | 2 +- tmuxinator/xing-measurements.yml | 7 + zshrc | 3 + 114 files changed, 4977 insertions(+), 4249 deletions(-) create mode 100644 .gitignore delete mode 100644 nvim/autocmd.vim delete mode 100644 nvim/functions.vim create mode 100644 nvim/init.lua delete mode 100644 nvim/init.vim create mode 100644 nvim/lua/kogakure/alpha.lua create mode 100644 nvim/lua/kogakure/autocommands.lua create mode 100644 nvim/lua/kogakure/autopairs.lua create mode 100644 nvim/lua/kogakure/blamer.lua create mode 100644 nvim/lua/kogakure/bufferline.lua create mode 100644 nvim/lua/kogakure/cmp.lua create mode 100644 nvim/lua/kogakure/colorizer.lua create mode 100644 nvim/lua/kogakure/colorscheme.lua create mode 100644 nvim/lua/kogakure/comment.lua create mode 100644 nvim/lua/kogakure/cursorline.lua create mode 100644 nvim/lua/kogakure/export-to-vscode.lua create mode 100644 nvim/lua/kogakure/functions.lua create mode 100644 nvim/lua/kogakure/fzf.lua create mode 100644 nvim/lua/kogakure/gitsigns.lua rename nvim/{plugin-config/goyo.vim => lua/kogakure/goyo.lua} (80%) create mode 100644 nvim/lua/kogakure/harpoon.lua create mode 100644 nvim/lua/kogakure/impatient.lua create mode 100644 nvim/lua/kogakure/indentline.lua create mode 100644 nvim/lua/kogakure/keymaps.lua create mode 100644 nvim/lua/kogakure/lsp/configs.lua create mode 100644 nvim/lua/kogakure/lsp/handlers.lua create mode 100644 nvim/lua/kogakure/lsp/init.lua create mode 100644 nvim/lua/kogakure/lsp/lightbulb.lua create mode 100644 nvim/lua/kogakure/lsp/null-ls.lua create mode 100644 nvim/lua/kogakure/lsp/settings/jsonls.lua create mode 100644 nvim/lua/kogakure/lsp/settings/pyright.lua create mode 100644 nvim/lua/kogakure/lsp/settings/sumneko_lua.lua create mode 100644 nvim/lua/kogakure/lsp/trouble.lua create mode 100644 nvim/lua/kogakure/lualine.lua create mode 100644 nvim/lua/kogakure/neoscroll.lua create mode 100644 nvim/lua/kogakure/nvim-tree.lua create mode 100644 nvim/lua/kogakure/options.lua create mode 100644 nvim/lua/kogakure/plugins.lua create mode 100644 nvim/lua/kogakure/project.lua create mode 100644 nvim/lua/kogakure/spectre.lua create mode 100644 nvim/lua/kogakure/speeddating.lua create mode 100644 nvim/lua/kogakure/telescope.lua create mode 100644 nvim/lua/kogakure/text-objects.lua create mode 100644 nvim/lua/kogakure/toggleterm.lua create mode 100644 nvim/lua/kogakure/treesitter.lua create mode 100644 nvim/lua/kogakure/vim-easymotion.lua create mode 100644 nvim/lua/kogakure/vim-gh-line.lua create mode 100644 nvim/lua/kogakure/vimux.lua create mode 100644 nvim/lua/kogakure/whichkey.lua delete mode 100644 nvim/mappings.vim delete mode 100644 nvim/plugin-config.vim delete mode 100644 nvim/plugin-config/autopairs.lua delete mode 100644 nvim/plugin-config/base16.vim delete mode 100644 nvim/plugin-config/blamer.vim delete mode 100644 nvim/plugin-config/bookmarks.vim delete mode 100644 nvim/plugin-config/bufferline.lua delete mode 100644 nvim/plugin-config/cmp.lua delete mode 100644 nvim/plugin-config/colorizer.lua delete mode 100644 nvim/plugin-config/diagnosticls-configs.lua delete mode 100644 nvim/plugin-config/export-to-vscode.lua delete mode 100644 nvim/plugin-config/fugitive.vim delete mode 100644 nvim/plugin-config/fzf.lua delete mode 100644 nvim/plugin-config/gitsigns.lua delete mode 100644 nvim/plugin-config/harpoon.lua delete mode 100644 nvim/plugin-config/lsp-config.vim delete mode 100644 nvim/plugin-config/lsp-installer.lua delete mode 100644 nvim/plugin-config/lspkind.lua delete mode 100644 nvim/plugin-config/lualine.lua delete mode 100644 nvim/plugin-config/neoformat.vim delete mode 100644 nvim/plugin-config/neoscroll.lua delete mode 100644 nvim/plugin-config/pandoc.vim delete mode 100644 nvim/plugin-config/prettier.vim delete mode 100644 nvim/plugin-config/sidebar.lua delete mode 100644 nvim/plugin-config/speeddating.vim delete mode 100644 nvim/plugin-config/telescope.lua delete mode 100644 nvim/plugin-config/tree.lua delete mode 100644 nvim/plugin-config/treesitter.lua delete mode 100644 nvim/plugin-config/trouble.lua delete mode 100644 nvim/plugin-config/ultisnips.vim delete mode 100644 nvim/plugin-config/vim-commentary.vim delete mode 100644 nvim/plugin-config/vim-easymotion.vim delete mode 100644 nvim/plugin-config/vim-gh-line.vim delete mode 100644 nvim/plugin-config/vimux.vim delete mode 100644 nvim/plugin-config/web-devicons.lua delete mode 100644 nvim/plugins.vim delete mode 100644 nvim/settings.vim mode change 100644 => 100755 nvim/spell/de.utf-8.add mode change 100644 => 100755 nvim/spell/de.utf-8.add.spl mode change 100644 => 100755 nvim/spell/de.utf-8.spl mode change 100644 => 100755 nvim/spell/de.utf-8.sug mode change 100644 => 100755 nvim/spell/en.utf-8.add mode change 100644 => 100755 nvim/spell/en.utf-8.add.spl mode change 100644 => 100755 nvim/spell/en.utf-8.spl mode change 100644 => 100755 nvim/spell/en.utf-8.sug delete mode 100644 nvim/ultisnips/javascript.snippets create mode 100755 setup/lua.sh create mode 100755 setup/rust.sh rename tmuxinator/{website-hamburg-stefanimhoff.de.yml => website-hamburg-stefanimhoff-de.yml} (79%) rename tmuxinator/{website-kogakure.de.yml => website-kogakure-de.yml} (83%) rename tmuxinator/{website-stefanimhoff.de.yml => website-stefanimhoff-de.yml} (83%) create mode 100644 tmuxinator/xing-measurements.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a34c6be --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +nvim/plugin diff --git a/hammerspoon/caffeine.lua b/hammerspoon/caffeine.lua index be5f279..dfdc231 100644 --- a/hammerspoon/caffeine.lua +++ b/hammerspoon/caffeine.lua @@ -1,20 +1,20 @@ -- Replace Caffeine.app with 18 lines of Lua :D local caffeine = hs.menubar.new() -function setCaffeineDisplay(state) - local result - if state then - result = caffeine:setIcon("~/.hammerspoon/icons/sun.pdf") - else - result = caffeine:setIcon("~/.hammerspoon/icons/moon.pdf") - end +function SetCaffeineDisplay(state) + local result + if state then + result = caffeine:setIcon("~/.hammerspoon/icons/sun.pdf") + else + result = caffeine:setIcon("~/.hammerspoon/icons/moon.pdf") + end end -function caffeineClicked() - setCaffeineDisplay(hs.caffeinate.toggle("displayIdle")) +function CaffeineClicked() + SetCaffeineDisplay(hs.caffeinate.toggle("displayIdle")) end if caffeine then - caffeine:setClickCallback(caffeineClicked) - setCaffeineDisplay(hs.caffeinate.get("displayIdle")) + caffeine:setClickCallback(CaffeineClicked) + SetCaffeineDisplay(hs.caffeinate.get("displayIdle")) end diff --git a/hammerspoon/functions.lua b/hammerspoon/functions.lua index e8d8243..005b9ce 100644 --- a/hammerspoon/functions.lua +++ b/hammerspoon/functions.lua @@ -5,124 +5,122 @@ -- Get list of screens and refresh that list whenever screens are plugged or unplugged: local screens = hs.screen.allScreens() local screenwatcher = hs.screen.watcher.new(function() - screens = hs.screen.allScreens() + screens = hs.screen.allScreens() end) screenwatcher:start() - -- Move a window a number of pixels in x and y -function nudge(xpos, ypos) - local win = hs.window.focusedWindow() - local f = win:frame() - f.x = f.x + xpos - f.y = f.y + ypos - win:setFrame(f) +function Nudge(xpos, ypos) + local win = hs.window.focusedWindow() + local f = win:frame() + f.x = f.x + xpos + f.y = f.y + ypos + win:setFrame(f) end - -- Resize a window by moving the bottom -function yank(xpixels, ypixels) - local win = hs.window.focusedWindow() - local f = win:frame() +function Yank(xpixels, ypixels) + local win = hs.window.focusedWindow() + local f = win:frame() - f.w = f.w + xpixels - f.h = f.h + ypixels - win:setFrame(f) + f.w = f.w + xpixels + f.h = f.h + ypixels + win:setFrame(f) end - -- Resize window for chunk of screen. -- For x and y: use 0 to expand fully in that dimension, 0.5 to expand halfway -- For w and h: use 1 for full, 0.5 for half -function push(x, y, w, h) - local win = hs.window.focusedWindow() - local f = win:frame() - local screen = win:screen() - local max = screen:frame() +function Push(x, y, w, h) + local win = hs.window.focusedWindow() + local f = win:frame() + local screen = win:screen() + local max = screen:frame() - f.x = max.x + (max.w*x) - f.y = max.y + (max.h*y) - f.w = max.w*w - f.h = max.h*h - win:setFrame(f) + f.x = max.x + (max.w * x) + f.y = max.y + (max.h * y) + f.w = max.w * w + f.h = max.h * h + win:setFrame(f) end - -- Move to monitor x. Checks to make sure monitor exists, if not moves to last monitor that exists -function moveToMonitor(x) - local win = hs.window.focusedWindow() - local newScreen = nil - while not newScreen do - newScreen = screens[x] - x = x-1 - end +function MoveToMonitor(x) + local win = hs.window.focusedWindow() + local newScreen = nil + while not newScreen do + newScreen = screens[x] + x = x - 1 + end - win:moveToScreen(newScreen) + win:moveToScreen(newScreen) end -- Move to next screen local function moveToNextScreen(win) - win = win or window.focusedWindow() - win:moveToScreen(win:screen():next()) + win = win or window.focusedWindow() + win:moveToScreen(win:screen():next()) end -- Move to previous screen local function moveToPreviousScreen(win) - win = win or window.focusedWindow() - win:moveToScreen(win:screen():previous()) + win = win or window.focusedWindow() + win:moveToScreen(win:screen():previous()) end -- This places a red circle around the mouse pointer local mouseCircle = nil local mouseCircleTimer = nil -function mouseHighlight() - -- Delete an existing highlight if it exists - if mouseCircle then - mouseCircle:delete() - if mouseCircleTimer then - mouseCircleTimer:stop() - end - end - -- Get the current co-ordinates of the mouse pointer - mousepoint = hs.mouse.get() - -- Prepare a big red circle around the mouse pointer - mouseCircle = hs.drawing.circle(hs.geometry.rect(mousepoint.x-40, mousepoint.y-40, 80, 80)) - mouseCircle:setStrokeColor({["red"]=1,["blue"]=0,["green"]=0,["alpha"]=1}) - mouseCircle:setFill(false) - mouseCircle:setStrokeWidth(5) - mouseCircle:show() +function MouseHighlight() + -- Delete an existing highlight if it exists + if mouseCircle then + mouseCircle:delete() + if mouseCircleTimer then + mouseCircleTimer:stop() + end + end + -- Get the current co-ordinates of the mouse pointer + Mousepoint = hs.mouse.get() + -- Prepare a big red circle around the mouse pointer + mouseCircle = hs.drawing.circle(hs.geometry.rect(Mousepoint.x - 40, Mousepoint.y - 40, 80, 80)) + mouseCircle:setStrokeColor({ ["red"] = 1, ["blue"] = 0, ["green"] = 0, ["alpha"] = 1 }) + mouseCircle:setFill(false) + mouseCircle:setStrokeWidth(5) + mouseCircle:show() - -- Set a timer to delete the circle after 3 seconds - mouseCircleTimer = hs.timer.doAfter(2, function() mouseCircle:delete() end) + -- Set a timer to delete the circle after 3 seconds + mouseCircleTimer = hs.timer.doAfter(2, function() + mouseCircle:delete() + end) end -- Get all valid windows -function getAllValidWindows() - local allWindows = hs.window.allWindows() - local windows = {} - local index = 1 - for i = 1, #allWindows do - local w = allWindows[i] - if w:screen() then - windows[index] = w - index = index + 1 - end - end - return windows +function GetAllValidWindows() + local allWindows = hs.window.allWindows() + local windows = {} + local index = 1 + for i = 1, #allWindows do + local w = allWindows[i] + if w:screen() then + windows[index] = w + index = index + 1 + end + end + return windows end -- Auto Reload Config -function reloadConfig(files) - doReload = false - for _,file in pairs(files) do - if file:sub(-4) == ".lua" then - doReload = true - end - end - if doReload then - hs.reload() - end +function ReloadConfig(files) + DoReload = false + for _, file in pairs(files) do + if file:sub(-4) == ".lua" then + DoReload = true + end + end + if DoReload then + hs.reload() + end end -hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", reloadConfig):start() +hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", ReloadConfig):start() hs.alert.show("Hammerspoon") diff --git a/hammerspoon/init.lua b/hammerspoon/init.lua index 625727b..bddc4d5 100644 --- a/hammerspoon/init.lua +++ b/hammerspoon/init.lua @@ -2,12 +2,11 @@ require("functions") require("caffeine") local application = hs.application -local window = hs.window -local layout = hs.layout -local screen = hs.screen -local hotkey = hs.hotkey -local hints = hs.hints - +local window = hs.window +local layout = hs.layout +local screen = hs.screen +local hotkey = hs.hotkey +local hints = hs.hints ------------------- -- Configuration -- @@ -17,8 +16,8 @@ local hints = hs.hints window.animationDuration = 0 -- Hints -hints.fontName = "Helvetica-Bold" -hints.fontSize = 18 +hints.fontName = "Helvetica-Bold" +hints.fontSize = 18 hints.showTitleThresh = 0 -- hints.style = "vimperator" -- Buggy, gets slow after a while @@ -30,28 +29,28 @@ application.enableSpotlightForNameSearches(true) ------------ -- Keys -local KEY_AM = { "⌥", "⌘" } -local KEY_CA = { "⌃", "⌥" } -local KEY_CAM = { "⌃", "⌥", "⌘" } -local KEY_CM = { "⌃", "⌘" } -local KEY_SAM = { "⇧", "⌥", "⌘" } -local KEY_SC = { "⇧", "⌘" } -local KEY_SCA = { "⇧", "⌃", "⌥" } +local KEY_AM = { "⌥", "⌘" } +local KEY_CA = { "⌃", "⌥" } +local KEY_CAM = { "⌃", "⌥", "⌘" } +local KEY_CM = { "⌃", "⌘" } +local KEY_SAM = { "⇧", "⌥", "⌘" } +local KEY_SC = { "⇧", "⌘" } +local KEY_SCA = { "⇧", "⌃", "⌥" } local KEY_SCAM = { "⇧", "⌃", "⌥", "⌘" } -local KEY_SCM = { "⇧", "⌃", "⌘" } +local KEY_SCM = { "⇧", "⌃", "⌘" } -- Displays local DISPLAY_PRIMARY = screen.primaryScreen() local DISPLAY_NOTEBOOK = "Color LCD" -- Sizes -local LEFT_MOST = hs.geometry.unitrect(0, 0, 0.6, 1) -local LEFT_LESS = hs.geometry.unitrect(0, 0, 0.4, 1) +local LEFT_MOST = hs.geometry.unitrect(0, 0, 0.6, 1) +local LEFT_LESS = hs.geometry.unitrect(0, 0, 0.4, 1) local RIGHT_MOST = hs.geometry.unitrect(0.4, 0, 0.6, 1) local RIGHT_LESS = hs.geometry.unitrect(0.6, 0, 0.4, 1) local FULLSCREEN = hs.geometry.unitrect(0, 0, 1, 1) local RIGHT_HALF = hs.geometry.unitrect(0.5, 0, 0.5, 1) -local LEFT_HALF = hs.geometry.unitrect(0, 0, 0.5, 1) +local LEFT_HALF = hs.geometry.unitrect(0, 0, 0.5, 1) ------------- -- Layouts -- @@ -62,44 +61,44 @@ local LEFT_HALF = hs.geometry.unitrect(0, 0, 0.5, 1) -- One Monitor and Notebook local LAYOUT_DUAL = { - {"Brave Browser", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Calendar", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Code", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"DEVONthink 3", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Element", nil, DISPLAY_NOTEBOOK, RIGHT_HALF, nil, nil}, - {"Firefox Developer Edition", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Mail", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Messages", nil, DISPLAY_PRIMARY, RIGHT_HALF, nil, nil}, - {"Microsoft Outlook", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Music", nil, DISPLAY_NOTEBOOK, FULLSCREEN, nil, nil}, - {"Obsidian", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Slack", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Sonos", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Telegram", nil, DISPLAY_PRIMARY, LEFT_HALF, nil, nil}, - {"Things", nil, DISPLAY_NOTEBOOK, FULLSCREEN, nil, nil}, - {"iA Writer", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"kitty", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, + { "Brave Browser", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Calendar", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Code", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "DEVONthink 3", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Element", nil, DISPLAY_NOTEBOOK, RIGHT_HALF, nil, nil }, + { "Firefox Developer Edition", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Mail", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Messages", nil, DISPLAY_PRIMARY, RIGHT_HALF, nil, nil }, + { "Microsoft Outlook", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Music", nil, DISPLAY_NOTEBOOK, FULLSCREEN, nil, nil }, + { "Obsidian", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Slack", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Sonos", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Telegram", nil, DISPLAY_PRIMARY, LEFT_HALF, nil, nil }, + { "Things", nil, DISPLAY_NOTEBOOK, FULLSCREEN, nil, nil }, + { "iA Writer", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "kitty", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, } -- One Monitor local LAYOUT_SINGLE = { - {"Brave Browser", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Calendar", nil, DISPLAY_PRIMARY, LEFT_MOST, nil, nil}, - {"Code", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"DEVONthink 3", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Element", nil, DISPLAY_PRIMARY, RIGHT_HALF, nil, nil}, - {"Firefox Developer Edition", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Mail", nil, DISPLAY_PRIMARY, RIGHT_MOST, nil, nil}, - {"Messages", nil, DISPLAY_PRIMARY, RIGHT_LESS, nil, nil}, - {"Microsoft Outlook", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Music", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Obsidian", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Slack", nil, DISPLAY_PRIMARY, LEFT_MOST, nil, nil}, - {"Sonos", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"Telegram", nil, DISPLAY_PRIMARY, LEFT_MOST, nil, nil}, - {"Things", nil, DISPLAY_PRIMARY, RIGHT_LESS, nil, nil}, - {"iA Writer", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, - {"kitty", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil}, + { "Brave Browser", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Calendar", nil, DISPLAY_PRIMARY, LEFT_MOST, nil, nil }, + { "Code", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "DEVONthink 3", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Element", nil, DISPLAY_PRIMARY, RIGHT_HALF, nil, nil }, + { "Firefox Developer Edition", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Mail", nil, DISPLAY_PRIMARY, RIGHT_MOST, nil, nil }, + { "Messages", nil, DISPLAY_PRIMARY, RIGHT_LESS, nil, nil }, + { "Microsoft Outlook", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Music", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Obsidian", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Slack", nil, DISPLAY_PRIMARY, LEFT_MOST, nil, nil }, + { "Sonos", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "Telegram", nil, DISPLAY_PRIMARY, LEFT_MOST, nil, nil }, + { "Things", nil, DISPLAY_PRIMARY, RIGHT_LESS, nil, nil }, + { "iA Writer", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, + { "kitty", nil, DISPLAY_PRIMARY, FULLSCREEN, nil, nil }, } ------------------ @@ -113,36 +112,44 @@ local LAYOUT_SINGLE = { -- hotkey.bind(KEY_AM, "left", function() nudge(-100, 0) end) -- Resize hotkeys -hotkey.bind(KEY_SAM, "up", function() yank(0, -100) end) -hotkey.bind(KEY_SAM, "down", function() yank(0, 100) end) -hotkey.bind(KEY_SAM, "right", function() yank(100, 0) end) -hotkey.bind(KEY_SAM, "left", function() yank(-100, 0) end) +hotkey.bind(KEY_SAM, "up", function() + Yank(0, -100) +end) +hotkey.bind(KEY_SAM, "down", function() + Yank(0, 100) +end) +hotkey.bind(KEY_SAM, "right", function() + Yank(100, 0) +end) +hotkey.bind(KEY_SAM, "left", function() + Yank(-100, 0) +end) -- Push to screen edge (Moved to Raycast -- keep for later) --- hotkey.bind(KEY_CAM, "left", function() push(0, 0, 0.5, 1) end) --- hotkey.bind(KEY_CAM, "right", function() push(0.5, 0, 0.5, 1) end) --- hotkey.bind(KEY_CAM, "up", function() push(0, 0, 1, 0.5) end) --- hotkey.bind(KEY_CAM, "down", function() push(0, 0.5, 1, 0.5) end) +-- hotkey.bind(KEY_CAM, "left", function() Push(0, 0, 0.5, 1) end) +-- hotkey.bind(KEY_CAM, "right", function() Push(0.5, 0, 0.5, 1) end) +-- hotkey.bind(KEY_CAM, "up", function() Push(0, 0, 1, 0.5) end) +-- hotkey.bind(KEY_CAM, "down", function() Push(0, 0.5, 1, 0.5) end) -- Centered window with some room to see the desktop (Moved to Raycast -- keep for later) --- hotkey.bind(KEY_SCM, "l", function() push(0.05, 0.05, 0.9, 0.9) end) --- hotkey.bind(KEY_SCM, "m", function() push(0.1, 0.1, 0.8, 0.8) end) --- hotkey.bind(KEY_SCM, "s", function() push(0.15, 0.15, 0.7, 0.7) end) +-- hotkey.bind(KEY_SCM, "l", function() Push(0.05, 0.05, 0.9, 0.9) end) +-- hotkey.bind(KEY_SCM, "m", function() Push(0.1, 0.1, 0.8, 0.8) end) +-- hotkey.bind(KEY_SCM, "s", function() Push(0.15, 0.15, 0.7, 0.7) end) -- Fullscreen (Moved to Raycast -- keep for later) --- hotkey.bind(KEY_CAM, "0", function() push(0, 0, 1, 1) end) +-- hotkey.bind(KEY_CAM, "0", function() Push(0, 0, 1, 1) end) -- Quarter Screens (Moved to Raycast -- keep for later) --- hotkey.bind(KEY_CAM, "q", function() push(0, 0, 0.5, 0.5) end) --- hotkey.bind(KEY_CAM, "w", function() push(0.5, 0, 0.5, 0.5) end) --- hotkey.bind(KEY_CAM, "a", function() push(0, 0.5, 0.5, 0.5) end) --- hotkey.bind(KEY_CAM, "s", function() push(0.5, 0.5, 0.5, 0.5) end) +-- hotkey.bind(KEY_CAM, "q", function() Push(0, 0, 0.5, 0.5) end) +-- hotkey.bind(KEY_CAM, "w", function() Push(0.5, 0, 0.5, 0.5) end) +-- hotkey.bind(KEY_CAM, "a", function() Push(0, 0.5, 0.5, 0.5) end) +-- hotkey.bind(KEY_CAM, "s", function() Push(0.5, 0.5, 0.5, 0.5) end) -- Part Screens (Moved to Raycast -- keep for later) --- hotkey.bind(KEY_CAM, "4", function() push(0, 0, 0.6, 1) end) --- hotkey.bind(KEY_CAM, "5", function() push(0, 0, 0.4, 1) end) --- hotkey.bind(KEY_CAM, "6", function() push(0.4, 0, 0.6, 1) end) --- hotkey.bind(KEY_CAM, "7", function() push(0.6, 0, 0.4, 1) end) +-- hotkey.bind(KEY_CAM, "4", function() Push(0, 0, 0.6, 1) end) +-- hotkey.bind(KEY_CAM, "5", function() Push(0, 0, 0.4, 1) end) +-- hotkey.bind(KEY_CAM, "6", function() Push(0.4, 0, 0.6, 1) end) +-- hotkey.bind(KEY_CAM, "7", function() Push(0.6, 0, 0.4, 1) end) -- Move a window between monitors (preserve size) -- hotkey.bind(KEY_CM, "1", function() window.focusedWindow():moveOneScreenNorth() end) @@ -189,10 +196,12 @@ hotkey.bind(KEY_SAM, "left", function() yank(-100, 0) end) -- hotkey.bind(KEY_SCAM, "Y", function() application.launchOrFocus("Music") end) -- Place red circle around mouse -hotkey.bind(KEY_SCAM, "space", mouseHighlight) +hotkey.bind(KEY_SCAM, "space", MouseHighlight) -- Manual config reloading (from getting started guide): -hotkey.bind(KEY_CAM, "delete", function() hs.reload() end) +hotkey.bind(KEY_CAM, "delete", function() + hs.reload() +end) -- Focus (Moved to Raycast -- keep for later) -- hotkey.bind(KEY_CAM, 'k', function() window.focusedWindow():focusWindowNorth() end) @@ -201,8 +210,14 @@ hotkey.bind(KEY_CAM, "delete", function() hs.reload() end) -- hotkey.bind(KEY_CAM, 'h', function() window.focusedWindow():focusWindowWest() end) -- Hints -hotkey.bind(KEY_CAM, "space", function() hints.windowHints(getAllValidWindows()) end) +hotkey.bind(KEY_CAM, "space", function() + hints.windowHints(GetAllValidWindows()) +end) -- Layouts -hotkey.bind(KEY_SCAM, "1", function() layout.apply(LAYOUT_SINGLE) end) -hotkey.bind(KEY_SCAM, "2", function() layout.apply(LAYOUT_DUAL) end) +hotkey.bind(KEY_SCAM, "1", function() + layout.apply(LAYOUT_SINGLE) +end) +hotkey.bind(KEY_SCAM, "2", function() + layout.apply(LAYOUT_DUAL) +end) diff --git a/nvim/after/plugin/abolish.vim b/nvim/after/plugin/abolish.vim index 25c40d5..8ddc657 100644 --- a/nvim/after/plugin/abolish.vim +++ b/nvim/after/plugin/abolish.vim @@ -1 +1,2 @@ Abolish teh the +Abolish {despa,sepe}rat{e,es,ed,ing,ely,ion,ions,or} {despe,sepa}rat{} diff --git a/nvim/autocmd.vim b/nvim/autocmd.vim deleted file mode 100644 index aba0967..0000000 --- a/nvim/autocmd.vim +++ /dev/null @@ -1,108 +0,0 @@ -" *** *** *** Autocommands *** *** *** -" ************************************ - -" Automatically highlight yanked content -augroup highlight_yank - autocmd! - autocmd TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700} -augroup END - -" Remember cursor position -augroup line_return - autocmd! - autocmd BufReadPost * - \ if line("'\"") > 1 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif -augroup END - -" HTML -augroup ft_html - autocmd! - autocmd FileType html,eruby,njk setlocal foldmethod=indent - autocmd FileType html,eruby,njk setlocal omnifunc=htmlcomplete#CompleteTags - autocmd Filetype html,eruby,njk setlocal ts=2 sts=2 sw=2 expandtab -augroup END - -" CSS -augroup ft_css - autocmd! - autocmd FileType css setlocal foldmethod=marker - autocmd FileType scss,sass,less,stylus setlocal foldmethod=indent - autocmd FileType css setlocal foldmarker={,} - autocmd FileType css,scss,sass,less,stylus setlocal omnifunc=csscomplete#CompleteCSS - autocmd Filetype css,scss,sass,less,stylus setlocal iskeyword+=- - autocmd Filetype css,scss,sass,less,stylus setlocal ts=2 sts=2 sw=2 expandtab -augroup END - -" XML -augroup ft_xml - autocmd! - autocmd FileType xml setlocal foldmethod=indent - autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags - autocmd Filetype xml setlocal ts=2 sts=2 sw=2 expandtab -augroup END - -" JavaScript -augroup ft_javascript - autocmd! - autocmd FileType javascript setlocal foldmethod=indent - autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS - autocmd FileType javascript setlocal ts=2 sts=2 sw=2 expandtab - autocmd BufRead,BufNewFile *.es6 setfiletype javascript - autocmd BufRead,BufNewFile *.jsx setfiletype javascript.jsx -augroup END - -" JSON -augroup ft_json - autocmd! - autocmd FileType json syntax match Comment +\/\/.\+$+ -augroup END - -" Ruby -augroup ft_ruby - autocmd! - autocmd FileType ruby setlocal foldmethod=syntax - autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete - autocmd FileType ruby let g:rubycomplete_buffer_loading = 1 - autocmd FileType ruby let g:rubycomplete_rails = 1 - autocmd FileType ruby let g:rubycomplete_classes_in_global = 1 -augroup END - -" Pandoc -augroup ft_pandoc - autocmd! - autocmd BufNewFile,BufFilePRe,BufRead *.pdc set filetype=markdown.pandoc - autocmd BufNewFile,BufFilePRe,BufRead *.md set filetype=markdown.pandoc - autocmd BufNewFile,BufFilePRe,BufRead *.markdown set filetype=markdown.pandoc -augroup END - -" Vim -augroup ft_vim - autocmd! - autocmd FileType vim setlocal foldmethod=marker -augroup END - -" PHP -autocmd FileType php set omnifunc=phpcomplete#CompletePHP - -" Git commit messages syntax -autocmd BufRead,BufNewFile COMMIT_EDITMSG setfiletype git - -" Makefile -autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab - -" Yaml -autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab - -" Misc file types -autocmd BufNewFile,BufRead *.handlebars set filetype=html syntax=handlebars -autocmd BufNewFile,BufRead *.hb set filetype=html syntax=handlebars -autocmd BufNewFile,BufRead *.hbs set filetype=html syntax=handlebars -autocmd BufNewFile,BufRead *.njk set filetype=html syntax=handlebars -autocmd BufNewFile,BufRead *.json set filetype=json -autocmd BufNewFile,BufRead *.pcss set filetype=css syntax=scss -autocmd BufNewFile,BufRead *.postcss set filetype=css syntax=scss -autocmd BufNewFile,BufRead *.rss set filetype=xml -autocmd BufEnter *.{js,jsx,ts,tsx} :syntax sync fromstart -autocmd BufLeave *.{js,jsx,ts,tsx} :syntax sync clear diff --git a/nvim/functions.vim b/nvim/functions.vim deleted file mode 100644 index d6d9794..0000000 --- a/nvim/functions.vim +++ /dev/null @@ -1,35 +0,0 @@ -" *** *** *** Functions *** *** *** -" ********************************* - -" Toggle between soft wrap and no wrap -nnoremap tw :call ToggleWrap() - -function! ToggleWrap() - if &wrap - echo "Wrap OFF" - set nowrap - set nolinebreak - set virtualedit=all - else - echo "Wrap ON" - set wrap - set linebreak - set virtualedit= - setlocal display+=lastline - endif -endfunction - -" Toggle between soft wrap and no wrap -nnoremap cw :call ToggleColorColumn() - -function! ToggleColorColumn() - if &colorcolumn == "80" - echo "Textwidth OFF" - set colorcolumn=0 - set textwidth=0 - else - echo "Textwidth ON" - set colorcolumn=80 - set textwidth=80 - endif -endfunction diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..c3ac493 --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,38 @@ +require("kogakure.options") +require("kogakure.keymaps") +require("kogakure.plugins") +require("kogakure.colorscheme") +require("kogakure.cmp") +require("kogakure.lsp") +require("kogakure.telescope") +require("kogakure.fzf") +require("kogakure.treesitter") +require("kogakure.autopairs") +require("kogakure.comment") +require("kogakure.harpoon") +require("kogakure.gitsigns") +require("kogakure.nvim-tree") +require("kogakure.bufferline") +require("kogakure.lualine") +require("kogakure.toggleterm") +require("kogakure.colorizer") +require("kogakure.project") +require("kogakure.impatient") +require("kogakure.indentline") +require("kogakure.alpha") +require("kogakure.whichkey") +require("kogakure.cursorline") +require("kogakure.neoscroll") +require("kogakure.blamer") +require("kogakure.vim-gh-line") +require("kogakure.export-to-vscode") +require("kogakure.spectre") +require("kogakure.speeddating") +require("kogakure.goyo") +require("kogakure.vim-easymotion") +require("kogakure.vimux") +require("kogakure.functions") +require("kogakure.autocommands") + +require("kogakure/text-objects").basic_text_objects() +require("kogakure/text-objects").indent_text_objects() diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index 18bb2ad..0000000 --- a/nvim/init.vim +++ /dev/null @@ -1,6 +0,0 @@ -source ~/.config/nvim/settings.vim -source ~/.config/nvim/mappings.vim -source ~/.config/nvim/functions.vim -source ~/.config/nvim/plugins.vim -source ~/.config/nvim/plugin-config.vim -source ~/.config/nvim/autocmd.vim diff --git a/nvim/lua/kogakure/alpha.lua b/nvim/lua/kogakure/alpha.lua new file mode 100644 index 0000000..ff9a7d4 --- /dev/null +++ b/nvim/lua/kogakure/alpha.lua @@ -0,0 +1,35 @@ +-- alpha-nvim – https://github.com/goolord/alpha-nvim +local status_ok, alpha = pcall(require, "alpha") +if not status_ok then + return +end + +local dashboard = require("alpha.themes.dashboard") +dashboard.section.header.val = { + [[╔════════════════════════╗]], + [[║ ╭────────────╮ ║]], + [[║ │ ﱲ 木隠 ﱲ │ ║]], + [[║ ╰────────────╯ ║]], + [[║       ﯤ    ║]], + [[╚════════════════════════╝]], +} + +dashboard.section.buttons.val = { + dashboard.button("f", " Find Files", ":FzfLua files"), + dashboard.button("e", " New File", ":ene startinsert"), + dashboard.button("p", " Find Project", ":Telescope projects"), + dashboard.button("r", " Recently Used Files", ":FzfLua oldfiles"), + dashboard.button("t", " Find Text", ":FzfLua live_grep"), + dashboard.button("b", " Browser Bookmarks", ":Telescope bookmarks"), + dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua"), + dashboard.button("u", " Update Plugins", ":PackerUpdate"), + dashboard.button("q", " Quit Neovim", ":qa"), +} + +dashboard.section.footer.opts.hl = "Type" +dashboard.section.header.opts.hl = "Include" +dashboard.section.buttons.opts.hl = "Keyword" + +dashboard.opts.opts.noautocmd = true + +alpha.setup(dashboard.opts) diff --git a/nvim/lua/kogakure/autocommands.lua b/nvim/lua/kogakure/autocommands.lua new file mode 100644 index 0000000..411f410 --- /dev/null +++ b/nvim/lua/kogakure/autocommands.lua @@ -0,0 +1,117 @@ +vim.cmd([[ + augroup _general_settings + autocmd! + autocmd FileType qf,help,man,lspinfo nnoremap q :close + autocmd BufWinEnter * :set formatoptions-=cro + autocmd FileType qf set nobuflisted + augroup end + + " Automatically highlight yanked content + augroup _highlight_yank + autocmd! + autocmd TextYankPost * silent! lua vim.highlight.on_yank({higroup = 'Visual', timeout = 700}) + augroup END + + " Remember cursor position + augroup _line_return + autocmd! + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + augroup END + + augroup _git + autocmd! + autocmd FileType gitcommit setlocal wrap + autocmd FileType gitcommit setlocal spell + autocmd BufRead,BufNewFile COMMIT_EDITMSG setfiletype git + augroup end + + augroup _markdown + autocmd! + autocmd FileType markdown setlocal wrap + autocmd FileType markdown setlocal spell + augroup end + + augroup _ft_html + autocmd! + autocmd FileType html,eruby,njk setlocal foldmethod=indent + autocmd FileType html,eruby,njk setlocal omnifunc=htmlcomplete#CompleteTags + autocmd Filetype html,eruby,njk setlocal ts=2 sts=2 sw=2 expandtab + augroup END + + augroup _ft_css + autocmd! + autocmd FileType css setlocal foldmethod=marker + autocmd FileType scss,sass,less,stylus setlocal foldmethod=indent + autocmd FileType css setlocal foldmarker={,} + autocmd FileType css,scss,sass,less,stylus setlocal omnifunc=csscomplete#CompleteCSS + autocmd Filetype css,scss,sass,less,stylus setlocal iskeyword+=- + autocmd Filetype css,scss,sass,less,stylus setlocal ts=2 sts=2 sw=2 expandtab + augroup END + + augroup _ft_xml + autocmd! + autocmd FileType xml setlocal foldmethod=indent + autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags + autocmd Filetype xml setlocal ts=2 sts=2 sw=2 expandtab + augroup END + + augroup _ft_javascript + autocmd! + autocmd FileType javascript setlocal foldmethod=indent + autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS + autocmd FileType javascript setlocal ts=2 sts=2 sw=2 expandtab + autocmd BufRead,BufNewFile *.es6 setfiletype javascript + autocmd BufRead,BufNewFile *.jsx setfiletype javascript.jsx + augroup END + + augroup _ft_json + autocmd! + autocmd FileType json syntax match Comment +\/\/.\+$+ + augroup END + + augroup _ft_ruby + autocmd! + autocmd FileType ruby setlocal foldmethod=syntax + autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete + autocmd FileType ruby let g:rubycomplete_buffer_loading = 1 + autocmd FileType ruby let g:rubycomplete_rails = 1 + autocmd FileType ruby let g:rubycomplete_classes_in_global = 1 + augroup END + + augroup _ft_vim + autocmd! + autocmd FileType vim setlocal foldmethod=marker + augroup END + + augroup _ft_misc + autocmd! + autocmd BufNewFile,BufRead *.handlebars set filetype=html syntax=handlebars + autocmd BufNewFile,BufRead *.hb set filetype=html syntax=handlebars + autocmd BufNewFile,BufRead *.hbs set filetype=html syntax=handlebars + autocmd BufNewFile,BufRead *.njk set filetype=html syntax=handlebars + autocmd BufNewFile,BufRead *.json set filetype=json + autocmd BufNewFile,BufRead *.pcss set filetype=css syntax=scss + autocmd BufNewFile,BufRead *.postcss set filetype=css syntax=scss + autocmd BufNewFile,BufRead *.rss set filetype=xml + autocmd BufEnter *.{js,jsx,ts,tsx} :syntax sync fromstart + autocmd BufLeave *.{js,jsx,ts,tsx} :syntax sync clear + augroup END + + augroup _auto_resize + autocmd! + autocmd VimResized * tabdo wincmd = + augroup end + + augroup _alpha + autocmd! + autocmd User AlphaReady set showtabline=0 | autocmd BufUnload set showtabline=2 + augroup end + + augroup _lsp + autocmd! + autocmd BufWritePre * lua vim.lsp.buf.formatting() + augroup end +]]) diff --git a/nvim/lua/kogakure/autopairs.lua b/nvim/lua/kogakure/autopairs.lua new file mode 100644 index 0000000..5c69a66 --- /dev/null +++ b/nvim/lua/kogakure/autopairs.lua @@ -0,0 +1,34 @@ +-- nvim-autopairs – https://github.com/windwp/nvim-autopairs +local status_ok, autopairs = pcall(require, "nvim-autopairs") +if not status_ok then + return +end + +autopairs.setup { + check_ts = true, + ts_config = { + lua = { "string", "source" }, + javascript = { "string", "template_string" }, + java = false, + }, + disable_filetype = { "TelescopePrompt", "spectre_panel" }, + fast_wrap = { + map = "", + chars = { "{", "[", "(", '"', "'" }, + pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""), + offset = 0, -- Offset from pattern match + end_key = "$", + keys = "qwertzuiopyxcvbnmasdfghjkl", + check_comma = true, + highlight = "PmenuSel", + highlight_grey = "LineNr", + }, +} + +local cmp_autopairs = require "nvim-autopairs.completion.cmp" +local cmp_status_ok, cmp = pcall(require, "cmp") +if not cmp_status_ok then + return +end + +cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) diff --git a/nvim/lua/kogakure/blamer.lua b/nvim/lua/kogakure/blamer.lua new file mode 100644 index 0000000..1958ba9 --- /dev/null +++ b/nvim/lua/kogakure/blamer.lua @@ -0,0 +1,10 @@ +-- blamer.vim – https://github.com/APZelos/blamer.nvim +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +vim.g.blamer_enabled = 0 +vim.g.blamer_relative_time = 1 +vim.g.blamer_delay = 200 + +-- Keymaps +keymap("n", "tb", [[BlamerToggle]], opts) diff --git a/nvim/lua/kogakure/bufferline.lua b/nvim/lua/kogakure/bufferline.lua new file mode 100644 index 0000000..960c9e7 --- /dev/null +++ b/nvim/lua/kogakure/bufferline.lua @@ -0,0 +1,71 @@ +-- bufferline.nvim – https://github.com/akinsho/bufferline.nvim +local status_ok, bufferline = pcall(require, "bufferline") +if not status_ok then + return +end + +bufferline.setup({ + highlights = { + fill = { + guibg = "#282828", + }, + tab_selected = { + guifg = { + attribute = "fg", + highlight = "Normal", + }, + guibg = { + attribute = "bg", + highlight = "Normal", + }, + }, + tab = { + guifg = { + attribute = "fg", + highlight = "TabLine", + }, + guibg = { + attribute = "bg", + highlight = "TabLine", + }, + }, + indicator_selected = { + guifg = { + attribute = "fg", + highlight = "LspDiagnosticsDefaultHint", + }, + guibg = { + attribute = "bg", + highlight = "Normal", + }, + }, + }, + options = { + modified_icon = "●", + left_trunc_marker = "", + right_trunc_marker = "", + close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions" + right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions" + left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions" + max_name_length = 25, + max_prefix_length = 25, + enforce_regular_tabs = false, + view = "multiwindow", + show_buffer_close_icons = true, + show_close_icon = false, + separator_style = "thin", + diagnostics = "nvim_lsp", + diagnostics_update_in_insert = false, + diagnostics_indicator = function(count, level, diagnostics_dict, context) + return "(" .. count .. ")" + end, + offsets = { + { + filetype = "NvimTree", + text = "File Explorer", + highlight = "Directory", + text_align = "left", + }, + }, + }, +}) diff --git a/nvim/lua/kogakure/cmp.lua b/nvim/lua/kogakure/cmp.lua new file mode 100644 index 0000000..7b875d0 --- /dev/null +++ b/nvim/lua/kogakure/cmp.lua @@ -0,0 +1,139 @@ +-- nvim-cmp – https://github.com/hrsh7th/nvim-cmp +local cmp_status_ok, cmp = pcall(require, "cmp") +if not cmp_status_ok then + return +end + +local snip_status_ok, luasnip = pcall(require, "luasnip") +if not snip_status_ok then + return +end + +require("luasnip/loaders/from_vscode").lazy_load() + +local check_backspace = function() + local col = vim.fn.col(".") - 1 + return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") +end + +--   פּ ﯟ   some other good icons +local kind_icons = { + Text = "", + Method = "m", + Function = "", + Constructor = "", + Field = "", + Variable = "", + Class = "", + Interface = "", + Module = "", + Property = "", + Unit = "", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "", + Event = "", + Operator = "", + TypeParameter = "", +} +-- find more here: https://www.nerdfonts.com/cheat-sheet + +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) -- For `luasnip` users. + end, + }, + mapping = { + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), + [""] = cmp.mapping.complete(), + [""] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. + [""] = cmp.mapping({ + i = cmp.mapping.abort(), + c = cmp.mapping.close(), + }), + -- Accept currently selected item. If none selected, `select` first item. + -- Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping.confirm({ + select = true, + }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expandable() then + luasnip.expand() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif check_backspace() then + fallback() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }, + formatting = { + fields = { "kind", "abbr", "menu" }, + format = function(entry, vim_item) + -- Kind icons + vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) + -- vim_item.kind = string.format("%s %s", kind_icons[vim_item.kind], vim_item.kind) -- This concatenates the icons with the name of the item kind + vim_item.menu = ({ + nvim_lsp = "[LSP]", + luasnip = "[Snippet]", + buffer = "[Buffer]", + path = "[Path]", + spell = "[Spell]", + dictionary = "[Dictionary]", + omni = "[Omni]", + nvim_lua = "[Nvim Lua]", + npm = "[npm]", + })[entry.source.name] + return vim_item + end, + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "nvim_lsp_signature_help" }, + { name = "buffer" }, + { name = "path" }, + { name = "spell" }, + { name = "dictionary" }, + { name = "omni" }, + { name = "nvim_lua" }, + { name = "npm", keyword_length = 4 }, + }, + confirm_opts = { + behavior = cmp.ConfirmBehavior.Replace, + select = false, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + experimental = { + ghost_text = true, + native_menu = false, + }, +}) diff --git a/nvim/lua/kogakure/colorizer.lua b/nvim/lua/kogakure/colorizer.lua new file mode 100644 index 0000000..a16733b --- /dev/null +++ b/nvim/lua/kogakure/colorizer.lua @@ -0,0 +1,21 @@ +-- colorizer.lua – https://github.com/norcalli/nvim-colorizer.lua +local status, colorizer = pcall(require, "colorizer") +if not status then + return +end + +colorizer.setup({ + "html", + "css", + "javascript", +}, { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = true, -- "Name" codes like Blue + RRGGBBAA = true, -- #RRGGBBAA hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn + mode = "background", -- Set the display mode.) +}) diff --git a/nvim/lua/kogakure/colorscheme.lua b/nvim/lua/kogakure/colorscheme.lua new file mode 100644 index 0000000..a2b72b1 --- /dev/null +++ b/nvim/lua/kogakure/colorscheme.lua @@ -0,0 +1,13 @@ +-- Colorscheme +local source = "~/.vimrc_background" +local status_ok, _ = pcall(vim.cmd, "source " .. source) + +if not status_ok then + vim.notify("Error sourcing " .. source) + return +end + +vim.cmd([[ +highlight ColorColumn guibg=#202224 +highlight SpellBad guifg=red +]]) diff --git a/nvim/lua/kogakure/comment.lua b/nvim/lua/kogakure/comment.lua new file mode 100644 index 0000000..4a7c777 --- /dev/null +++ b/nvim/lua/kogakure/comment.lua @@ -0,0 +1,23 @@ +-- Comment.nvim – https://github.com/numToStr/comment.nvim +local status_ok, comment = pcall(require, "Comment") +if not status_ok then + return +end + +comment.setup { + pre_hook = function(ctx) + local U = require "Comment.utils" + + local location = nil + if ctx.ctype == U.ctype.block then + location = require("ts_context_commentstring.utils").get_cursor_location() + elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then + location = require("ts_context_commentstring.utils").get_visual_start_location() + end + + return require("ts_context_commentstring.internal").calculate_commentstring { + key = ctx.ctype == U.ctype.line and "__default" or "__multiline", + location = location, + } + end +} diff --git a/nvim/lua/kogakure/cursorline.lua b/nvim/lua/kogakure/cursorline.lua new file mode 100644 index 0000000..4501565 --- /dev/null +++ b/nvim/lua/kogakure/cursorline.lua @@ -0,0 +1,18 @@ +-- nvim-cursorline – https://github.com/yamatsum/nvim-cursorline +local status, cursorline = pcall(require, "nvim-cursorline") +if not status then + return +end + +cursorline.setup({ + cursorline = { + enable = true, + timeout = 1000, + number = false, + }, + cursorword = { + enable = true, + min_length = 3, + hl = { underline = true }, + }, +}) diff --git a/nvim/lua/kogakure/export-to-vscode.lua b/nvim/lua/kogakure/export-to-vscode.lua new file mode 100644 index 0000000..872bf16 --- /dev/null +++ b/nvim/lua/kogakure/export-to-vscode.lua @@ -0,0 +1,6 @@ +--- export-to-vscode.nvim – https://github.com/elijahmanor/export-to-vscode.nvim +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +-- Keymaps +keymap("n", "code", [[lua require("export-to-vscode").launch()]], opts) diff --git a/nvim/lua/kogakure/functions.lua b/nvim/lua/kogakure/functions.lua new file mode 100644 index 0000000..91cef2a --- /dev/null +++ b/nvim/lua/kogakure/functions.lua @@ -0,0 +1,51 @@ +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } +local cfg = vim.fn.stdpath("config") + +vim.cmd([[ +function! ToggleWrap() + if &wrap + echo "Wrap OFF" + set nowrap + set nolinebreak + set virtualedit=all + else + echo "Wrap ON" + set wrap + set linebreak + set virtualedit= + setlocal display+=lastline + endif +endfunction + +function! ToggleColorColumn() + if &colorcolumn == "80" + echo "Textwidth OFF" + set colorcolumn=0 + set textwidth=0 + else + echo "Textwidth ON" + set colorcolumn=80 + set textwidth=80 + endif +endfunction + +function! SpellEn() + set spell + set spelllang=en_us + set spellfile=~/.config/nvim/spell/en.utf-8.add +endfunction + +function! SpellDe() + set spell + set spelllang=de_de + set spellfile=~/.config/nvim/spell/de.utf-8.add +endfunction +]]) + +-- Keymaps +-- Toggle between soft wrap and no wrap +keymap("n", "tw", [[call ToggleWrap()]], opts) + +-- Toggle between soft wrap and no wrap +keymap("n", "tcc", [[call ToggleColorColumn()]], opts) diff --git a/nvim/lua/kogakure/fzf.lua b/nvim/lua/kogakure/fzf.lua new file mode 100644 index 0000000..992ef93 --- /dev/null +++ b/nvim/lua/kogakure/fzf.lua @@ -0,0 +1,44 @@ +-- fzf-lua – https://github.com/ibhagwan/fzf-lua +local cmp_status_ok, fzf_lua = pcall(require, "fzf-lua") +if not cmp_status_ok then + return +end + +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +fzf_lua.setup({ + lsp = { + async_or_timeout = 3000, -- make lsp requests synchronous so they work with null-ls + }, +}) + +-- Keymaps +keymap("n", "", [[:FzfLua files]], opts) +keymap("n", "b", [[:FzfLua buffers]], opts) +keymap("n", "zbl", [[:FzfLua blines]], opts) +keymap("n", "zf", [[:FzfLua files]], opts) +keymap("n", "zg", [[:FzfLua grep]], opts) +keymap("n", "zgb", [[:FzfLua git_branches]], opts) +keymap("n", "zgc", [[:FzfLua git_commits]], opts) +keymap("n", "zgl", [[:FzfLua grep_last]], opts) +keymap("n", "zgp", [[:FzfLua grep_project]], opts) +keymap("n", "zgs", [[:FzfLua git_status]], opts) +keymap("n", "zgst", [[:FzfLua git_stash]], opts) +keymap("n", "zgv", [[:FzfLua grep_visual]], opts) +keymap("n", "zgw", [[:FzfLua grep_cword]], opts) +keymap("n", "zh", [[:FzfLua oldfiles]], opts) +keymap("n", "zl", [[:FzfLua lines]], opts) +keymap("n", "zlca", [[:FzfLua code_actions]], opts) +keymap("n", "zld", [[:FzfLua lsp_definitions]], opts) +keymap("n", "zlds", [[:FzfLua lsp_document_symbols]], opts) +keymap("n", "zlg", [[:FzfLua live_grep]], opts) +keymap("n", "zlgr", [[:FzfLua live_grep_resume]], opts) +keymap("n", "zlr", [[:FzfLua lsp_references]], opts) +keymap("n", "zltd", [[:FzfLua lsp_typedef]], opts) +keymap("n", "zlws", [[:FzfLua lsp_live_workspace_symbols]], opts) +keymap("n", "zm", [[:FzfLua marks]], opts) +keymap("n", "zqfq", [[:FzfLua quickfix]], opts) +keymap("n", "zr", [[:FzfLua resume]], opts) +keymap("n", "zss", [[:FzfLua spell_suggest]], opts) +keymap("n", "ztg", [[:FzfLua tabs]], opts) diff --git a/nvim/lua/kogakure/gitsigns.lua b/nvim/lua/kogakure/gitsigns.lua new file mode 100644 index 0000000..ab1ab9e --- /dev/null +++ b/nvim/lua/kogakure/gitsigns.lua @@ -0,0 +1,49 @@ +-- gitsigns.nvim – https://github.com/lewis6991/gitsigns.nvim +local status_ok, gitsigns = pcall(require, "gitsigns") +if not status_ok then + return +end + +gitsigns.setup({ + signs = { + add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, + change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, + delete = { hl = "GitSignsDelete", text = "▎", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, + topdelete = { hl = "GitSignsDelete", text = "▎", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, + changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, + }, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + interval = 1000, + follow_files = true, + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = "eol", -- "eol" | "overlay" | "right_align" + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter_opts = { + relative_time = false, + }, + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, + preview_config = { + -- Options passed to nvim_open_win + border = "single", + style = "minimal", + relative = "cursor", + row = 0, + col = 1, + }, + yadm = { + enable = false, + }, +}) diff --git a/nvim/plugin-config/goyo.vim b/nvim/lua/kogakure/goyo.lua similarity index 80% rename from nvim/plugin-config/goyo.vim rename to nvim/lua/kogakure/goyo.lua index bad86e3..5fd5e86 100644 --- a/nvim/plugin-config/goyo.vim +++ b/nvim/lua/kogakure/goyo.lua @@ -1,6 +1,8 @@ -" Goyo -" https://github.com/junegunn/goyo.vim +-- Goyo – https://github.com/junegunn/goyo.vim +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } +vim.cmd([[ function! s:goyo_enter() if executable('tmux') && strlen($TMUX) silent !tmux set status off @@ -25,6 +27,4 @@ endfunction autocmd! User GoyoEnter nested call goyo_enter() autocmd! User GoyoLeave nested call goyo_leave() - -" Mappings -noremap z :Goyo +]]) diff --git a/nvim/lua/kogakure/harpoon.lua b/nvim/lua/kogakure/harpoon.lua new file mode 100644 index 0000000..6b204de --- /dev/null +++ b/nvim/lua/kogakure/harpoon.lua @@ -0,0 +1,18 @@ +-- Harpoon – https://github.com/ThePrimeagen/harpoon +local status, harpoon = pcall(require, "harpoon") +if not status then + return +end + +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +harpoon.setup() + +-- Keymaps +keymap("n", "a", [[lua require("harpoon.mark").add_file()]], opts) +keymap("n", ",", [[lua require("harpoon.ui").toggle_quick_menu()]], opts) +keymap("n", "1", [[lua require("harpoon.ui").nav_file(1)]], opts) +keymap("n", "2", [[lua require("harpoon.ui").nav_file(2)]], opts) +keymap("n", "3", [[lua require("harpoon.ui").nav_file(3)]], opts) +keymap("n", "4", [[lua require("harpoon.ui").nav_file(4)]], opts) diff --git a/nvim/lua/kogakure/impatient.lua b/nvim/lua/kogakure/impatient.lua new file mode 100644 index 0000000..a6ac8a0 --- /dev/null +++ b/nvim/lua/kogakure/impatient.lua @@ -0,0 +1,7 @@ +-- impatient.nvim – https://github.com/lewis6991/impatient.nvim +local status_ok, impatient = pcall(require, "impatient") +if not status_ok then + return +end + +impatient.enable_profile() diff --git a/nvim/lua/kogakure/indentline.lua b/nvim/lua/kogakure/indentline.lua new file mode 100644 index 0000000..12053a1 --- /dev/null +++ b/nvim/lua/kogakure/indentline.lua @@ -0,0 +1,24 @@ +-- Indent Blankline – https://github.com/lukas-reineke/indent-blankline.nvim +local status_ok, indent_blankline = pcall(require, "indent_blankline") +if not status_ok then + return +end + +vim.opt.termguicolors = true +vim.cmd([[ +highlight IndentBlanklineIndent1 guibg=#1f1f1f gui=nocombine +highlight IndentBlanklineIndent2 guibg=#1a1a1a gui=nocombine +]]) + +indent_blankline.setup({ + char = "", + char_highlight_list = { + "IndentBlanklineIndent1", + "IndentBlanklineIndent2", + }, + space_char_highlight_list = { + "IndentBlanklineIndent1", + "IndentBlanklineIndent2", + }, + show_trailing_blankline_indent = false, +}) diff --git a/nvim/lua/kogakure/keymaps.lua b/nvim/lua/kogakure/keymaps.lua new file mode 100644 index 0000000..50d5c9e --- /dev/null +++ b/nvim/lua/kogakure/keymaps.lua @@ -0,0 +1,130 @@ +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +--- Remap space as key +keymap("", "", "", opts) + +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- Quick toggle between buffers +keymap("n", "j", ":b#", opts) + +-- Add semicolon or comma to the end of the line +keymap("n", ";;", "A;", opts) +keymap("n", ",,", "A,", opts) + +-- Maintain the cursor position when yanking a visual selection +keymap("v", "y", "myy`y", opts) + +-- Delete last character of line +keymap("n", "x", "$x", opts) + +-- Open vim config in a new buffer, reload vim config +keymap("n", "ve", "e $MYVIMRC", opts) +keymap("n", "vr", "source $MYVIMRC", opts) + +-- Delete current buffer +keymap("n", "X", ":Bdelete", opts) + +-- Delete all buffers +keymap("n", "da", ":bufdo bdelete", opts) + +-- Allow gf to open non-existent files +keymap("", "gf", ":edit ", opts) + +-- Reselect visual selection after indenting +keymap("v", "<", "", ">gv", opts) + +-- Set spell checker to `s` +-- zg (good), zG (good temp), zw (wrong), zW (wrong temp) +keymap("n", "rs", ":set spell!", opts) + +-- Switch off highlighting +keymap("n", "h", ":nohlsearch", opts) + +-- Toggle list +keymap("n", "l", ":set list!", opts) + +-- Indent the whole source code +keymap("n", "pf", "gg=G''", opts) + +-- Reverse the mark mapping +keymap("n", "'", "`", opts) +keymap("n", "`", "'", opts) + +-- Visuall select of just pasted content +keymap("n", "gP", "`[v`]", opts) +keymap("n", "gy", "`[v`]y", opts) + +-- When text is wrapped, move by terminal rows, not lines, unless a count is provided +keymap("n", " j", "(v:count == 0 ? 'gj' : 'j')", opts) +keymap("n", " k", "(v:count == 0 ? 'gk' : 'k')", opts) + +-- Open a quickfix window for the last search +keymap("n", "?", ":execute 'vimgrep /'.@/.'/g %':copen", opts) + +-- Faster linewise scrolling +keymap("n", "", "3", opts) +keymap("n", "", "3", opts) + +-- Keep the window centered +keymap("n", "G", "Gzzzv", opts) +keymap("n", "n", "nzzzv", opts) +keymap("n", "N", "Nzzzv", opts) +keymap("n", "}", "}zzzv", opts) +keymap("n", "{", "{zzzv", opts) + +-- Close all buffers +keymap("n", "XX", ":qa", opts) + +-- Add lines in NORMAL Mode +keymap("n", "gN", "ok", opts) +keymap("n", "gNN", "Oj", opts) + +-- Change to the folder of the current file +keymap("n", "cf", ":cd %:p:h:pwd", opts) + +-- Reformat a line into a block +keymap("n", "rq", "gqip", opts) + +-- Reformat a block into a line +keymap("n", "rqq", "vipJ", opts) + +-- Easier split navigation +keymap("n", "", "", opts) +keymap("n", "", "", opts) +keymap("n", "", "", opts) +keymap("n", "", "", opts) + +-- Resize with arrows +keymap("n", "", ":resize +2", opts) +keymap("n", "", ":resize -2", opts) +keymap("n", "", ":vertical resize +2", opts) +keymap("n", "", ":vertical resize -2", opts) + +-- Stay in indent mode +keymap("v", "<", "", ">gv", opts) + +-- Move text up and down +keymap("v", "", ":m .+1==", opts) +keymap("v", "", ":m .-2==", opts) + +-- Navigate buffers +keymap("n", "", ":bnext", opts) +keymap("n", "", ":bprevious", opts) + +-- Remap Jump to Tag +keymap("n", "ü", "", opts) +keymap("n", "Ü", "", opts) + +-- Open for Markdown in iA Writer +keymap("n", "ia", ":silent !open -a iA\\ Writer.app '%:p'", opts) + +-- Custom Text-Objects +keymap("o", "il", ":normal! $v^", opts) +keymap("x", "il", ":normal! $v^", opts) +keymap("o", "al", ":normal! $v0", opts) +keymap("x", "al", ":normal! $v0", opts) diff --git a/nvim/lua/kogakure/lsp/configs.lua b/nvim/lua/kogakure/lsp/configs.lua new file mode 100644 index 0000000..a66d01d --- /dev/null +++ b/nvim/lua/kogakure/lsp/configs.lua @@ -0,0 +1,50 @@ +local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer") +if not status_ok then + return +end + +local lspconfig = require("lspconfig") + +local servers = { + "cssls", + "cssmodules_ls", + "diagnosticls", + "emmet_ls", + "graphql", + "html", + "jsonls", + "pyright", + "quick_lint_js", + "sumneko_lua", + "tsserver", +} + +lsp_installer.settings({ + ui = { + icons = { + server_installed = "✓", + server_pending = "➜", + server_uninstalled = "✗", + }, + }, + + max_concurrent_installers = 4, +}) + +lsp_installer.setup({ + ensure_installed = servers, +}) + +for _, server in pairs(servers) do + local opts = { + on_attach = require("kogakure.lsp.handlers").on_attach, + capabilities = require("kogakure.lsp.handlers").capabilities, + } + + local has_custom_opts, server_custom_opts = pcall(require, "kogakure.lsp.settings." .. server) + if has_custom_opts then + opts = vim.tbl_deep_extend("force", opts, server_custom_opts) + end + + lspconfig[server].setup(opts) +end diff --git a/nvim/lua/kogakure/lsp/handlers.lua b/nvim/lua/kogakure/lsp/handlers.lua new file mode 100644 index 0000000..0c1d3f0 --- /dev/null +++ b/nvim/lua/kogakure/lsp/handlers.lua @@ -0,0 +1,126 @@ +local M = {} + +M.setup = function() + local signs = { + { name = "DiagnosticSignError", text = "" }, + { name = "DiagnosticSignWarn", text = "" }, + { name = "DiagnosticSignHint", text = "" }, + { name = "DiagnosticSignInfo", text = "" }, + } + + for _, sign in ipairs(signs) do + vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) + end + + local config = { + virtual_text = false, -- disable virtual text + signs = { + active = signs, -- show signs + }, + update_in_insert = true, + underline = true, + severity_sort = true, + float = { + focusable = false, + style = "minimal", + border = "rounded", + source = "always", + header = "", + prefix = "", + }, + } + + vim.diagnostic.config(config) + + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "rounded", + }) + + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "rounded", + }) +end + +local function lsp_highlight_document(client) + -- Set autocommands conditional on server_capabilities + if client.resolved_capabilities.document_highlight then + vim.api.nvim_exec( + [[ + augroup lsp_document_highlight + autocmd! * + autocmd CursorHold lua vim.lsp.buf.document_highlight() + autocmd CursorMoved lua vim.lsp.buf.clear_references() + augroup END + ]], + false + ) + end +end + +local function lsp_keymaps(bufnr) + local opts = { noremap = true, silent = true } + local keymap = vim.api.nvim_buf_set_keymap + + keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) + keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) + keymap(bufnr, "n", "g0", "lua vim.lsp.buf.document_symbol()", opts) + keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) + keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) + keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) + keymap(bufnr, "n", "gl", "lua vim.diagnostic.open_float()", opts) + keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) + keymap(bufnr, "n", "Ä", "lua vim.diagnostic.goto_prev()", opts) + keymap(bufnr, "n", "ä", "lua vim.diagnostic.goto_next()", opts) +end + +-- TODO: Neovim 0.8 https://github.com/jose-elias-alvarez/null-ls.nvim/wiki/Avoiding-LSP-formatting-conflicts +local lsp_formatting = function(bufnr) + -- vim.lsp.buf.format({}) + vim.lsp.buf.formatting({ + filter = function(client) + return client.name == "null-ls" + end, + bufnr = bufnr, + }) +end + +local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) + +M.on_attach = function(client, bufnr) + -- Autosave + if client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + buffer = bufnr, + callback = function() + lsp_formatting(bufnr) + end, + }) + end + + -- TypeScript + if client.name == "tsserver" then + client.resolved_capabilities.document_formatting = false + end + + -- Lua + if client.name == "sumneko_lua" then + client.resolved_capabilities.document_formatting = false + client.resolved_capabilities.document_range_formatting = false + end + + lsp_keymaps(bufnr) + lsp_highlight_document(client) +end + +local capabilities = vim.lsp.protocol.make_client_capabilities() + +local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") +if not status_ok then + return +end + +M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) + +return M diff --git a/nvim/lua/kogakure/lsp/init.lua b/nvim/lua/kogakure/lsp/init.lua new file mode 100644 index 0000000..18b1f91 --- /dev/null +++ b/nvim/lua/kogakure/lsp/init.lua @@ -0,0 +1,10 @@ +local status_ok, _ = pcall(require, 'lspconfig') +if not status_ok then + return +end + +require('kogakure.lsp.configs') +require('kogakure.lsp.handlers').setup() +require('kogakure.lsp.null-ls') +require('kogakure.lsp.trouble') +require('kogakure.lsp.lightbulb') diff --git a/nvim/lua/kogakure/lsp/lightbulb.lua b/nvim/lua/kogakure/lsp/lightbulb.lua new file mode 100644 index 0000000..4b4b76e --- /dev/null +++ b/nvim/lua/kogakure/lsp/lightbulb.lua @@ -0,0 +1,11 @@ +-- nvim-lightbulb – https://github.com/kosayoda/nvim-lightbulb +local status, lightbulb = pcall(require, "nvim-lightbulb") +if not status then + return +end + +lightbulb.setup({ + autocmd = { + enabled = true + }, +}) diff --git a/nvim/lua/kogakure/lsp/null-ls.lua b/nvim/lua/kogakure/lsp/null-ls.lua new file mode 100644 index 0000000..4350d13 --- /dev/null +++ b/nvim/lua/kogakure/lsp/null-ls.lua @@ -0,0 +1,48 @@ +-- null-ls.nvim – https://github.com/jose-elias-alvarez/null-ls.nvim +local null_ls_status_ok, null_ls = pcall(require, "null-ls") +if not null_ls_status_ok then + return +end + +local opts = { noremap = true, silent = true } + +-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/ +local formatting = null_ls.builtins.formatting +local diagnostics = null_ls.builtins.diagnostics +local completion = null_ls.builtins.completion +local hover = null_ls.builtins.hover +local code_actions = null_ls.builtins.code_actions + +null_ls.setup({ + debug = false, + sources = { + code_actions.eslint_d, + code_actions.gitrebase, + code_actions.gitsigns, + code_actions.proselint, + completion.luasnip, + completion.spell, + -- diagnostics.codespell, + diagnostics.eslint_d, -- Eslint + diagnostics.flake8, -- Python + diagnostics.gitlint, + diagnostics.jsonlint, + diagnostics.markdownlint, + diagnostics.stylelint, + diagnostics.tsc, + -- diagnostics.write_good, + diagnostics.yamllint, + diagnostics.zsh, + formatting.autopep8, -- Python + formatting.black.with({ extra_args = { "--fast" } }), -- Python + formatting.eslint_d, + formatting.json_tool, + formatting.markdownlint, + formatting.prettier.with({ extra_args = { "--single-quote" } }), + formatting.stylelint, + formatting.stylua, -- Lua + formatting.trim_newlines, + formatting.trim_whitespace, + hover.dictionary, + }, +}) diff --git a/nvim/lua/kogakure/lsp/settings/jsonls.lua b/nvim/lua/kogakure/lsp/settings/jsonls.lua new file mode 100644 index 0000000..14d932a --- /dev/null +++ b/nvim/lua/kogakure/lsp/settings/jsonls.lua @@ -0,0 +1,211 @@ +-- Find more schemas here: https://www.schemastore.org/json/ +local default_schemas = nil +local status_ok, jsonls_settings = pcall(require, 'nlspsettings.jsonls') +if status_ok then + default_schemas = jsonls_settings.get_default_schemas() +end + +local schemas = { + { + description = 'TypeScript compiler configuration file', + fileMatch = { + 'tsconfig.json', + 'tsconfig.*.json', + }, + url = 'https://json.schemastore.org/tsconfig.json', + }, + { + description = 'Lerna config', + fileMatch = { + 'lerna.json', + }, + url = 'https://json.schemastore.org/lerna.json', + }, + { + description = 'Babel configuration', + fileMatch = { + '.babelrc.json', + '.babelrc', + 'babel.config.json', + }, + url = 'https://json.schemastore.org/babelrc.json', + }, + { + description = 'ESLint config', + fileMatch = { + '.eslintrc.json', + '.eslintrc', + }, + url = 'https://json.schemastore.org/eslintrc.json', + }, + { + description = 'Bucklescript config', + fileMatch = { + 'bsconfig.json', + }, + url = 'https://raw.githubusercontent.com/rescript-lang/rescript-compiler/8.2.0/docs/docson/build-schema.json', + }, + { + description = 'Prettier config', + fileMatch = { + '.prettierrc', + '.prettierrc.json', + 'prettier.config.json', + }, + url = 'https://json.schemastore.org/prettierrc', + }, + { + description = 'Vercel Now config', + fileMatch = { + 'now.json', + }, + url = 'https://json.schemastore.org/now', + }, + { + description = 'Stylelint config', + fileMatch = { + '.stylelintrc', + '.stylelintrc.json', + 'stylelint.config.json', + }, + url = 'https://json.schemastore.org/stylelintrc', + }, + { + description = 'A JSON schema for the ASP.NET LaunchSettings.json files', + fileMatch = { + 'launchsettings.json', + }, + url = 'https://json.schemastore.org/launchsettings.json', + }, + { + description = 'Schema for CMake Presets', + fileMatch = { + 'CMakePresets.json', + 'CMakeUserPresets.json', + }, + url = 'https://raw.githubusercontent.com/Kitware/CMake/master/Help/manual/presets/schema.json', + }, + { + description = 'Configuration file as an alternative for configuring your repository in the settings page.', + fileMatch = { + '.codeclimate.json', + }, + url = 'https://json.schemastore.org/codeclimate.json', + }, + { + description = 'LLVM compilation database', + fileMatch = { + 'compile_commands.json', + }, + url = 'https://json.schemastore.org/compile-commands.json', + }, + { + description = 'Config file for Command Task Runner', + fileMatch = { + 'commands.json', + }, + url = 'https://json.schemastore.org/commands.json', + }, + { + description = 'AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.', + fileMatch = { + '*.cf.json', + 'cloudformation.json', + }, + url = 'https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/cloudformation.schema.json', + }, + { + description = 'The AWS Serverless Application Model (AWS SAM, previously known as Project Flourish) extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.', + fileMatch = { + 'serverless.template', + '*.sam.json', + 'sam.json', + }, + url = 'https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/sam.schema.json', + }, + { + description = 'Json schema for properties json file for a GitHub Workflow template', + fileMatch = { + '.github/workflow-templates/**.properties.json', + }, + url = 'https://json.schemastore.org/github-workflow-template-properties.json', + }, + { + description = 'golangci-lint configuration file', + fileMatch = { + '.golangci.toml', + '.golangci.json', + }, + url = 'https://json.schemastore.org/golangci-lint.json', + }, + { + description = 'JSON schema for the JSON Feed format', + fileMatch = { + 'feed.json', + }, + url = 'https://json.schemastore.org/feed.json', + versions = { + ['1'] = 'https://json.schemastore.org/feed-1.json', + ['1.1'] = 'https://json.schemastore.org/feed.json', + }, + }, + { + description = 'Packer template JSON configuration', + fileMatch = { + 'packer.json', + }, + url = 'https://json.schemastore.org/packer.json', + }, + { + description = 'NPM configuration file', + fileMatch = { + 'package.json', + }, + url = 'https://json.schemastore.org/package.json', + }, + { + description = 'JSON schema for Visual Studio component configuration files', + fileMatch = { + '*.vsconfig', + }, + url = 'https://json.schemastore.org/vsconfig.json', + }, + { + description = 'Resume json', + fileMatch = { + 'resume.json', + }, + url = 'https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json', + }, +} + +local function extend(tab1, tab2) + if tab2 == nil then + return tab2 + end + for _, value in ipairs(tab2) do + table.insert(tab1, value) + end + return tab1 +end + +local extended_schemas = extend(schemas, default_schemas) + +local opts = { + settings = { + json = { + schemas = extended_schemas, + }, + }, + setup = { + commands = { + Format = { + function() + vim.lsp.buf.range_formatting({}, { 0, 0, }, { vim.fn.line '$', 0 }) + end, + }, + }, + }, +} + +return opts diff --git a/nvim/lua/kogakure/lsp/settings/pyright.lua b/nvim/lua/kogakure/lsp/settings/pyright.lua new file mode 100644 index 0000000..09bda65 --- /dev/null +++ b/nvim/lua/kogakure/lsp/settings/pyright.lua @@ -0,0 +1,9 @@ +return { + settings = { + python = { + analysis = { + typeCheckingMode = 'off', + }, + }, + }, +} diff --git a/nvim/lua/kogakure/lsp/settings/sumneko_lua.lua b/nvim/lua/kogakure/lsp/settings/sumneko_lua.lua new file mode 100644 index 0000000..f62fc65 --- /dev/null +++ b/nvim/lua/kogakure/lsp/settings/sumneko_lua.lua @@ -0,0 +1,15 @@ +return { + settings = { + Lua = { + diagnostics = { + globals = { "vim", "hs", "window" }, + }, + workspace = { + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.stdpath("config") .. "/lua"] = true, + }, + }, + }, + }, +} diff --git a/nvim/lua/kogakure/lsp/trouble.lua b/nvim/lua/kogakure/lsp/trouble.lua new file mode 100644 index 0000000..a3bb023 --- /dev/null +++ b/nvim/lua/kogakure/lsp/trouble.lua @@ -0,0 +1,8 @@ +-- Trouble – https://github.com/folke/trouble.nvim +local status, trouble = pcall(require, 'trouble') +if (not status) then + return +end + +trouble.setup() + diff --git a/nvim/lua/kogakure/lualine.lua b/nvim/lua/kogakure/lualine.lua new file mode 100644 index 0000000..bd04e1d --- /dev/null +++ b/nvim/lua/kogakure/lualine.lua @@ -0,0 +1,35 @@ +-- lualine.nvim – https://github.com/nvim-lualine/lualine.nvim +local status, lualine = pcall(require, "lualine") +if not status then + return +end + +lualine.setup({ + options = { + icons_enabled = true, + theme = "onedark", + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline " }, + always_divide_middle = true, + globalstatus = false, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { "filename" }, + lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + extensions = {}, +}) diff --git a/nvim/lua/kogakure/neoscroll.lua b/nvim/lua/kogakure/neoscroll.lua new file mode 100644 index 0000000..52cf3e7 --- /dev/null +++ b/nvim/lua/kogakure/neoscroll.lua @@ -0,0 +1,7 @@ +-- Neoscroll – https://github.com/karb94/neoscroll.nvim +local status, neoscroll = pcall(require, 'neoscroll') +if (not status) then + return +end + +neoscroll.setup() diff --git a/nvim/lua/kogakure/nvim-tree.lua b/nvim/lua/kogakure/nvim-tree.lua new file mode 100644 index 0000000..26eae46 --- /dev/null +++ b/nvim/lua/kogakure/nvim-tree.lua @@ -0,0 +1,7 @@ +-- nvim-tree.lua – https://github.com/kyazdani42/nvim-tree.lua +local status_ok, nvim_tree = pcall(require, "nvim-tree") +if not status_ok then + return +end + +nvim_tree.setup() diff --git a/nvim/lua/kogakure/options.lua b/nvim/lua/kogakure/options.lua new file mode 100644 index 0000000..6899ef9 --- /dev/null +++ b/nvim/lua/kogakure/options.lua @@ -0,0 +1,84 @@ +-- :help options +local options = { + autowrite = true, + backspace = { "indent", "eol", "start" }, -- Intuitive backspacing + backup = false, + clipboard = "unnamedplus", + completeopt = { "menu", "menuone", "preview" }, + confirm = true, + copyindent = true, + cursorline = true, + expandtab = true, + foldlevel = 2, + foldlevelstart = 99, + foldmethod = "syntax", + foldnestmax = 10, + grepformat = "%f:%l:%c:%m", + grepprg = "rg\\ --vimgrep\\ --no-heading\\ --smart-case", + hidden = true, + ignorecase = true, + list = true, + listchars = { + tab = "∙\\ ", + trail = "·", + nbsp = ".", + extends = "❯", + precedes = "❮", + }, + mouse = "a", + number = true, + omnifunc = "syntaxcomplete#Complete", + redrawtime = 10000, -- Allow more time for loading syntax on large files + relativenumber = true, + scrolloff = 8, + shiftround = true, + shiftwidth = 2, + shortmess = "caoOtI", -- Welcome screen + showbreak = "↪", + sidescrolloff = 8, + signcolumn = "yes:2", + smartcase = true, + softtabstop = 2, + spelllang = "en_us", + splitbelow = true, + splitright = true, + swapfile = false, + tabstop = 2, + termguicolors = true, + timeoutlen = 300, + title = true, + undofile = true, + virtualedit = "all", + visualbell = true, + wildmode = { "longest:full", "full" }, + wrap = false, + writebackup = false, +} + +for k, v in pairs(options) do + vim.opt[k] = v +end + +-- Add dashes to words +vim.opt.iskeyword:append("-") + +-- Don"t delete the word, but put a $ to the end till exit the mode +vim.opt.cpoptions:append("$") + +vim.opt.path:append("**") +vim.opt.complete:append({ "i", "k", "s", "kspell" }) + +-- FIXME: When using "vim.opt.spellfile:append("~/.config/…) the file is not writable" +vim.cmd([[ +" Spell Checker +set spellfile+=~/.config/nvim/spell/en.utf-8.add + +" Custom Dictionaries ( ) +set dictionary+=~/.config/nvim/dictionary/de_user.txt +set dictionary+=~/.config/nvim/dictionary/de_neu.txt +set dictionary+=~/.config/nvim/dictionary/en_us.txt + +" Custom Thesauri (Synonyms) ( ) +set thesaurus+=~/.config/nvim/thesaurus/de_user.txt +set thesaurus+=~/.config/nvim/thesaurus/de_openthesaurus.txt +]]) diff --git a/nvim/lua/kogakure/plugins.lua b/nvim/lua/kogakure/plugins.lua new file mode 100644 index 0000000..85a6c48 --- /dev/null +++ b/nvim/lua/kogakure/plugins.lua @@ -0,0 +1,168 @@ +-- Packer.nvim – https://github.com/wbthomason/packer.nvim +local fn = vim.fn + +-- Automatically install packer +local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + PACKER_BOOTSTRAP = fn.system({ + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + }) + print("Installing packer close and reopen Neovim...") + vim.cmd([[packadd packer.nvim]]) +end + +-- Autocommand that reloads neovim whenever you save the plugins.lua file +vim.cmd([[ +augroup packer_user_config +autocmd! +autocmd BufWritePost plugins.lua source | PackerSync +augroup end +]]) + +-- Use a protected call so we don’t error out on first use +local status_ok, packer = pcall(require, "packer") +if not status_ok then + return +end + +-- Have packer use a popup window +packer.init({ + display = { + open_fn = function() + return require("packer.util").float({ + border = "rounded", + }) + end, + }, +}) + +-- Plugins +return packer.startup(function(use) + use("wbthomason/packer.nvim") -- Have packer manage itself + use("nvim-lua/popup.nvim") -- An implementation of the Popup API from vim in Neovim + use("nvim-lua/plenary.nvim") -- Useful lua functions used ny lots of plugins + + -- Colorscheme + use("chriskempson/base16-vim") -- Base16 colorschemes + + -- CMP + use("hrsh7th/nvim-cmp") -- The completion plugin + use("hrsh7th/cmp-buffer") -- Buffer completions + use("hrsh7th/cmp-path") -- Path completions + use("hrsh7th/cmp-cmdline") -- Cmdline completions + use("hrsh7th/cmp-nvim-lua") -- Lua API completions + use("saadparwaiz1/cmp_luasnip") -- Snippet completions + use("uga-rosa/cmp-dictionary") -- Dictionary completions + use("f3fora/cmp-spell") -- Spell completions + use("David-Kunz/cmp-npm") -- NPM package completions + use("hrsh7th/cmp-nvim-lsp") -- LSP completions + use("hrsh7th/cmp-nvim-lsp-signature-help") -- LSP Signature Help + + -- Snippets + use("L3MON4D3/LuaSnip") -- Snippet Engine + use("rafamadriz/friendly-snippets") -- A bunch of snippets + + -- LSP + use("neovim/nvim-lspconfig") -- Enable LSP + use("williamboman/nvim-lsp-installer") -- Simple to use language server installer + use("jose-elias-alvarez/null-ls.nvim") -- Inject LSP diagnostics, code actions, and more + use("folke/trouble.nvim") -- Diagnostics + use("creativenull/diagnosticls-configs-nvim") -- Collection of linters and formatters + use("tamago324/nlsp-settings.nvim") -- LSP for json/yaml + use({ "kosayoda/nvim-lightbulb", requires = "antoinemadec/FixCursorHold.nvim" }) + + -- FZF + use({ "junegunn/fzf", run = "./install --bin" }) + use("ibhagwan/fzf-lua") + + -- Telescope + use("nvim-telescope/telescope.nvim") + use("dhruvmanila/telescope-bookmarks.nvim") -- Open browser bookmarks + use("nvim-telescope/telescope-file-browser.nvim") -- File and folder actions + use("sudormrfbin/cheatsheet.nvim") -- Searchable cheatsheet + use("nvim-telescope/telescope-node-modules.nvim") -- node_modules packages + use("gbrlsnchs/telescope-lsp-handlers.nvim") -- LSP handlers + use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) + use({ "nvim-telescope/telescope-frecency.nvim", requires = { "tami5/sqlite.lua" } }) -- Frequency and recency + + -- Treesitter + use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }) + use("p00f/nvim-ts-rainbow") -- Rainbox parentheses + use("nvim-treesitter/playground") -- Treesitter information in Neovim + + -- File/Window Management + use("ThePrimeagen/harpoon") -- Getting you where you want + use("lewis6991/gitsigns.nvim") -- Git decorations + use("kyazdani42/nvim-web-devicons") -- Icons and colors for file types + use("kyazdani42/nvim-tree.lua") -- A File Explorer + use("akinsho/bufferline.nvim") -- Emulate tabs for buffers + use("moll/vim-bbye") -- Delete buffers without closing the window + use("akinsho/toggleterm.nvim") -- Terminal in Neovim + use("nvim-lualine/lualine.nvim") -- Statusline + use("norcalli/nvim-colorizer.lua") -- Highlight colors + use("ahmedkhalf/project.nvim") -- Project Management + use("lewis6991/impatient.nvim") -- Speed Up Startup + use("lukas-reineke/indent-blankline.nvim") -- Indentation guides + use("goolord/alpha-nvim") -- Customizable Greeter + use("antoinemadec/FixCursorHold.nvim") -- This is needed to fix lsp doc highlight + use("MattesGroeger/vim-bookmarks") -- Bookmarks + use("folke/which-key.nvim") -- Display possible keybindings + use("karb94/neoscroll.nvim") -- Smooth scrolling + use("APZelos/blamer.nvim") -- Git Blame + use("elijahmanor/export-to-vscode.nvim") -- Export active Buffers to Visual Studio Code + use("bogado/file-line") -- Jump directly to line in file with 'nvim index.html:20' + use("ruanyl/vim-gh-line") -- Open current line in GitHub + use("nvim-pack/nvim-spectre") -- Search and replace + use("junegunn/goyo.vim") -- Zen Mode (1) + use("folke/zen-mode.nvim") -- Zen Mode (2) + use("tpope/vim-eunuch") -- UNIX Shell commands + use("folke/twilight.nvim") -- Dim inactive code + + -- Editing Files + use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter + use("numToStr/Comment.nvim") -- Easily comment stuff + use("JoosepAlviste/nvim-ts-context-commentstring") -- Comment based on cursor location of file + use({ "iamcco/markdown-preview.nvim", run = "cd app && yarn install", cmd = "MarkdownPreview" }) + use("yamatsum/nvim-cursorline") -- Highlight words and lines on the cursor + use("mattn/emmet-vim") -- Emmet + use("editorconfig/editorconfig-vim") -- Editorconfig + use("sheerun/vim-polyglot") -- A collection of language packs (?) + use("godlygeek/tabular") -- Align everything + use("tpope/vim-abolish") -- Autofix spelling mistakes + use("mg979/vim-visual-multi") -- Multi cursor mode + use("vim-scripts/VisIncr") -- Increase and decreasing numbers, dates, daynames etc. + use("tpope/vim-speeddating") -- Increase dates, times, etc. + use("rstacruz/vim-xtract") -- Extract code into new file + use("tpope/vim-repeat") -- Repeat plugins + use("tpope/vim-surround") -- Replace, add, remove surroundings + + -- Custom Text Objects + use("christoomey/vim-titlecase") + use("glts/vim-textobj-comment") -- ac, ic, aC + use("jceb/vim-textobj-uri") -- au, iu, go + use("kana/vim-textobj-datetime") -- ada, add, adf, adt, adz, ida, … + use("kana/vim-textobj-user") + use("michaeljsmith/vim-indent-object") -- ai, ii, aI, iI + use("whatyouhide/vim-textobj-xmlattr") -- ax, ix + + -- Custom Motions + use("christoomey/vim-sort-motion") -- gs + use("tommcdo/vim-exchange") -- cx, cxx, X, cxc + use("easymotion/vim-easymotion") -- f/L + + -- TMUX + use("christoomey/vim-tmux-navigator") + use("preservim/vimux") + use("tyewang/vimux-jest-test") + + -- Automatically set up your configuration after cloning packer.nvim + -- Put this at the end after all plugins + if PACKER_BOOTSTRAP then + require("packer").sync() + end +end) diff --git a/nvim/lua/kogakure/project.lua b/nvim/lua/kogakure/project.lua new file mode 100644 index 0000000..5909b9d --- /dev/null +++ b/nvim/lua/kogakure/project.lua @@ -0,0 +1,32 @@ +-- project.nvim – https://github.com/ahmedkhalf/project.nvim +local status_ok, project = pcall(require, "project_nvim") +if not status_ok then + return +end + +project.setup({ + active = true, + on_config_done = nil, + manual_mode = false, + detection_methods = { + "pattern", + }, + patterns = { + ".git", + "_darcs", + ".hg", + ".bzr", + ".svn", + "Makefile", + -- 'package.json', + }, + show_hidden = false, + silent_chdir = true, + ignore_lsp = {}, + datapath = vim.fn.stdpath("data"), +}) + +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +keymap("n", "pm", [[:Telescope projects]], opts) diff --git a/nvim/lua/kogakure/spectre.lua b/nvim/lua/kogakure/spectre.lua new file mode 100644 index 0000000..25e4337 --- /dev/null +++ b/nvim/lua/kogakure/spectre.lua @@ -0,0 +1,7 @@ +-- nvim-spectre – https://github.com/nvim-pack/nvim-spectre +local status_ok, spectre = pcall(require, "spectre") +if not status_ok then + return +end + +spectre.setup() diff --git a/nvim/lua/kogakure/speeddating.lua b/nvim/lua/kogakure/speeddating.lua new file mode 100644 index 0000000..874d71a --- /dev/null +++ b/nvim/lua/kogakure/speeddating.lua @@ -0,0 +1,4 @@ +-- speeddating.vim – https://github.com/tpope/vim-speeddating +vim.cmd([[ +autocmd VimEnter * SpeedDatingFormat %d.%m.%Y +]]) diff --git a/nvim/lua/kogakure/telescope.lua b/nvim/lua/kogakure/telescope.lua new file mode 100644 index 0000000..5d5cb08 --- /dev/null +++ b/nvim/lua/kogakure/telescope.lua @@ -0,0 +1,170 @@ +-- telescope.nvim – https://github.com/nvim-telescope/telescope.nvim/ +local status_ok, telescope = pcall(require, "telescope") +if not status_ok then + return +end + +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +local actions = require("telescope.actions") + +-- Extensions +telescope.load_extension("bookmarks") +telescope.load_extension("node_modules") +telescope.load_extension("file_browser") +telescope.load_extension("frecency") +telescope.load_extension("lsp_handlers") +telescope.load_extension("fzf") +telescope.load_extension("harpoon") +telescope.load_extension("projects") + +-- Keymaps +keymap("n", "bm", [[Telescope bookmarks]], opts) +keymap("n", "gb", [[Telescope git_branches]], opts) +keymap("n", "gs", [[Telescope git_status]], opts) +keymap("n", "ht", [[Telescope help_tags]], opts) +keymap("n", "km", [[Telescope keymaps]], opts) +keymap("n", "m", [[Telescope marks]], opts) +keymap("n", "mru", [[Telescope frecency]], opts) +keymap("n", "nm", [[Telescope node_modules list]], opts) +keymap("n", "tb", [[Telescope buffers]], opts) +keymap("n", "C", [[:Cheatsheet]], opts) +keymap("n", "tf", [[Telescope find_files]], opts) +keymap("n", "tfa", [[Telescope find_files hidden=true]], opts) +keymap("n", "tfb", [[Telescope file_browser]], opts) +keymap("n", "tg", [[Telescope tags]], opts) +keymap("n", "tlg", [[Telescope live_grep]], opts) +keymap("n", "tr", [[Telescope resume]], opts) + +-- Setup +telescope.setup({ + defaults = { + prompt_prefix = " ", + selection_caret = " ", + path_display = { + "smart", + }, + file_ignore_pattern = { + "yarn.lock", + }, + mappings = { + -- INSERT Mode + i = { + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + + [""] = actions.close, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + + [""] = actions.toggle_selection + actions.move_selection_worse, + [""] = actions.toggle_selection + actions.move_selection_better, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + [""] = actions.complete_tag, + [""] = actions.which_key, -- keys from pressing + }, + -- NORMAL Mode + n = { + [""] = actions.close, + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + + [""] = actions.toggle_selection + actions.move_selection_worse, + [""] = actions.toggle_selection + actions.move_selection_better, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + + ["j"] = actions.move_selection_next, + ["k"] = actions.move_selection_previous, + ["H"] = actions.move_to_top, + ["M"] = actions.move_to_middle, + ["L"] = actions.move_to_bottom, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + ["gg"] = actions.move_to_top, + ["G"] = actions.move_to_bottom, + + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + + ["?"] = actions.which_key, + }, + }, + }, + pickers = { + buffers = { + theme = "dropdown", + previewer = false, + show_all_buffers = true, + sort_lastused = true, + }, + }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + file_browser = { + theme = "ivy", + hijack_netrw = true, + }, + frecency = { + show_scores = false, + show_unindexed = true, + ignore_patterns = { + "*.git/*", + "*/tmp/*", + }, + disable_devicons = false, + }, + bookmarks = { + selected_browser = "brave", + url_open_command = "open", + }, + lsp_handlers = { + disable = {}, + location = { + telescope = {}, + no_results_message = "No references found", + }, + symbol = { + telescope = {}, + no_results_message = "No symbols found", + }, + call_hierarchy = { + telescope = {}, + no_results_message = "No calls found", + }, + code_action = { + telescope = require("telescope.themes").get_dropdown({}), + no_results_message = "No code actions available", + prefix = "", + }, + }, + }, +}) diff --git a/nvim/lua/kogakure/text-objects.lua b/nvim/lua/kogakure/text-objects.lua new file mode 100644 index 0000000..256eeb4 --- /dev/null +++ b/nvim/lua/kogakure/text-objects.lua @@ -0,0 +1,80 @@ +local keymap = vim.api.nvim_set_keymap + +-- Basic Text Objects +function Basic_text_objects() + local chars = { "_", ".", ":", ",", ";", "|", "/", "\\", "*", "+", "%", "`", "?" } + for _, char in ipairs(chars) do + for _, mode in ipairs({ "x", "o" }) do + keymap(mode, "i" .. char, string.format(":normal! T%svt%s", char, char), { + noremap = true, + silent = true, + }) + keymap(mode, "a" .. char, string.format(":normal! F%svf%s", char, char), { + noremap = true, + silent = true, + }) + end + end +end + +function Select_indent(around) + local start_indent = vim.fn.indent(vim.fn.line(".")) + local blank_line_pattern = "^%s*$" + + if string.match(vim.fn.getline("."), blank_line_pattern) then + return + end + + if vim.v.count > 0 then + start_indent = start_indent - vim.o.shiftwidth * (vim.v.count - 1) + if start_indent < 0 then + start_indent = 0 + end + end + + local prev_line = vim.fn.line(".") - 1 + local prev_blank_line = function(line) + return string.match(vim.fn.getline(line), blank_line_pattern) + end + while prev_line > 0 and (prev_blank_line(prev_line) or vim.fn.indent(prev_line) >= start_indent) do + vim.cmd("-") + prev_line = vim.fn.line(".") - 1 + end + if around then + vim.cmd("-") + end + + vim.cmd("normal! 0V") + + local next_line = vim.fn.line(".") + 1 + local next_blank_line = function(line) + return string.match(vim.fn.getline(line), blank_line_pattern) + end + local last_line = vim.fn.line("$") + while next_line <= last_line and (next_blank_line(next_line) or vim.fn.indent(next_line) >= start_indent) do + vim.cmd("+") + next_line = vim.fn.line(".") + 1 + end + if around then + vim.cmd("+") + end +end + +-- Indent Text Object +function Indent_text_objects() + for _, mode in ipairs({ "x", "o" }) do + keymap(mode, "ii", ":lua select_indent()", { + noremap = true, + silent = true, + }) + keymap(mode, "ai", ":lua select_indent(true)", { + noremap = true, + silent = true, + }) + end +end + +return { + basic_text_objects = Basic_text_objects, + indent_text_objects = Indent_text_objects, +} diff --git a/nvim/lua/kogakure/toggleterm.lua b/nvim/lua/kogakure/toggleterm.lua new file mode 100644 index 0000000..ee3e3cc --- /dev/null +++ b/nvim/lua/kogakure/toggleterm.lua @@ -0,0 +1,98 @@ +local status_ok, toggleterm = pcall(require, "toggleterm") +if not status_ok then + return +end + +toggleterm.setup({ + size = 20, + open_mapping = [[]], + hide_numbers = true, + shade_filetypes = {}, + shade_terminals = true, + shading_factor = 2, + start_in_insert = true, + insert_mappings = true, + persist_size = true, + direction = "float", + close_on_exit = true, + shell = vim.o.shell, + float_opts = { + border = "curved", + winblend = 0, + highlights = { + border = "Normal", + background = "Normal", + }, + }, +}) + +function _G.set_terminal_keymaps() + local opts = { + noremap = true, + } + local keymap = vim.api.nvim_buf_set_keymap + + keymap(0, "t", "", [[]], opts) + keymap(0, "t", "", [[h]], opts) + keymap(0, "t", "", [[j]], opts) + keymap(0, "t", "", [[k]], opts) + keymap(0, "t", "", [[l]], opts) +end + +vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()") + +local Terminal = require("toggleterm.terminal").Terminal +local lazygit = Terminal:new({ + cmd = "lazygit", + hidden = true, +}) + +function _LAZYGIT_TOGGLE() + lazygit:toggle() +end + +local node = Terminal:new({ + cmd = "node", + hidden = true, +}) + +function _NODE_TOGGLE() + node:toggle() +end + +local ncdu = Terminal:new({ + cmd = "ncdu", + hidden = true, +}) + +function _NCDU_TOGGLE() + ncdu:toggle() +end + +local htop = Terminal:new({ + cmd = "htop", + hidden = true, +}) + +function _HTOP_TOGGLE() + htop:toggle() +end + +local python = Terminal:new({ + cmd = "python", + hidden = true, +}) + +function _PYTHON_TOGGLE() + python:toggle() +end + +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true, } + +-- Keymaps +keymap("n", "lg", "lua _LAZYGIT_TOGGLE()", opts) +keymap("n", "node", "lua _NODE_TOGGLE()", opts) +keymap("n", "py", "lua _PYTHON_TOGGLE()", opts) +keymap("n", "top", "lua _HTOP_TOGGLE()", opts) +keymap("n", "ncdu", "lua _NCDU_TOGGLE()", opts) diff --git a/nvim/lua/kogakure/treesitter.lua b/nvim/lua/kogakure/treesitter.lua new file mode 100644 index 0000000..8526740 --- /dev/null +++ b/nvim/lua/kogakure/treesitter.lua @@ -0,0 +1,32 @@ +-- nvim-treesitter – https://github.com/nvim-treesitter/nvim-treesitter/ +local status_ok, configs = pcall(require, "nvim-treesitter.configs") +if not status_ok then + return +end + +configs.setup { + ensure_installed = "all", + sync_install = false, + ignore_install = { "" }, -- List of parsers to ignore installing + autopairs = { + enable = true, + }, + highlight = { + enable = true, -- false will disable the whole extension + disable = { "" }, -- list of language that will be disabled + additional_vim_regex_highlighting = true, + }, + indent = { enable = true, disable = { "yaml" } }, + context_commentstring = { + enable = true, + enable_autocmd = false, + }, + rainbow = { + enable = true, + extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean + max_file_lines = nil, -- Do not enable for files with more than n lines, int + }, + playground = { + enable = true, + } +} diff --git a/nvim/lua/kogakure/vim-easymotion.lua b/nvim/lua/kogakure/vim-easymotion.lua new file mode 100644 index 0000000..ccae282 --- /dev/null +++ b/nvim/lua/kogakure/vim-easymotion.lua @@ -0,0 +1,12 @@ +-- vim-easymotion – https://github.com/easymotion/vim-easymotion +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +-- Keymaps +-- f{char} to move to {char} +keymap("", "l", [[(easymotion-bd-f)]], opts) +keymap("n", "l", [[(easymotion-overwin-f)]], opts) + +-- Move to line +keymap("", "L", [[(easymotion-bd-jk)]], opts) +keymap("n", "L", [[(easymotion-overwin-line)]], opts) diff --git a/nvim/lua/kogakure/vim-gh-line.lua b/nvim/lua/kogakure/vim-gh-line.lua new file mode 100644 index 0000000..e2953bb --- /dev/null +++ b/nvim/lua/kogakure/vim-gh-line.lua @@ -0,0 +1,3 @@ +-- vim-gh-line – https://github.com/ruanyl/vim-gh-line + +vim.g.gh_github_domain = "source.xing.cm" diff --git a/nvim/lua/kogakure/vimux.lua b/nvim/lua/kogakure/vimux.lua new file mode 100644 index 0000000..fdd5cb1 --- /dev/null +++ b/nvim/lua/kogakure/vimux.lua @@ -0,0 +1,15 @@ +-- Vimux – https://github.com/preservim/vimux +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +vim.g.VimuxHeight = "30" +vim.g.VimuxOrientation = "h" +vim.g.VimuxUseNearestPane = 0 + +-- Keymaps +keymap("n", "vt", [[VimuxTogglePane]], opts) +keymap("n", "vp", [[VimuxPromptCommand]], opts) +keymap("n", "vl", [[VimuxRunLastCommand]], opts) +keymap("n", "vj", [[RunJest]], opts) +keymap("n", "vjb", [[RunJestOnBuffer]], opts) +keymap("n", "vjf", [[RunJestFocused]], opts) diff --git a/nvim/lua/kogakure/whichkey.lua b/nvim/lua/kogakure/whichkey.lua new file mode 100644 index 0000000..d8b6939 --- /dev/null +++ b/nvim/lua/kogakure/whichkey.lua @@ -0,0 +1,257 @@ +local status_ok, which_key = pcall(require, "which-key") +if not status_ok then + return +end + +local mappings = { + a = { "Alpha", "Alpha" }, + b = { + "lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})", + "Buffers", + }, + c = { "lua require('Comment.api').toggle_current_linewise()", "Comment" }, + d = { "TroubleToggle", "Diagnostics" }, + e = { "NvimTreeToggle", "Explorer" }, + f = { "FzfLua files", "Find Files" }, + h = { "nohlsearch", "No Highlight" }, + j = { "b#", "Toggle Buffers" }, + i = { "silent !open -a iA\\ Writer.app '%:p'", "Open in iA Writer" }, + p = { + name = "Packer", + c = { "PackerCompile", "Compile" }, + i = { "PackerInstall", "Install" }, + s = { "PackerSync", "Sync" }, + S = { "PackerStatus", "Status" }, + u = { "PackerUpdate", "Update" }, + }, + q = { "Bdelete!", "Close Buffer" }, + s = { + a = { ":FzfLua lsp_code_actions", "LSP Code Actions" }, + d = { ":FzfLua lsp_definitions", "LSP Definitions" }, + s = { ":FzfLua lsp_document_symbols", "LSP Document Symbols" }, + w = { ":FzfLua lsp_live_workspace_symbols", "LSP Live Workspace Symbols" }, + r = { ":FzfLua lsp_references", "LSP References" }, + t = { ":FzfLua lsp_typedef", "LSP Type Definition" }, + name = "Search", + F = { + name = "FZF", + b = { ":FzfLua blines", "Bufferlines" }, + f = { ":FzfLua files", "Files" }, + h = { ":FzfLua oldfiles", "Open Files History" }, + i = { ":FzfLua spell_suggest", "Spelling Suggestions" }, + m = { ":FzfLua marks", "Marks" }, + o = { ":FzfLua lines", "Open Buffer Lines" }, + q = { ":FzfLua quickfix", "Quickfix" }, + r = { ":FzfLua resume", "Resume last command" }, + t = { ":FzfLua tabs", "Tabs" }, + g = { + name = "Git", + b = { ":FzfLua git_branches", "Git Branches" }, + c = { ":FzfLua git_commits", "Git Commits" }, + s = { ":FzfLua git_stash", "Git Stashes" }, + t = { ":FzfLua git_status", "Git Status" }, + }, + s = { + name = "Search", + s = { ":FzfLua grep", "Grep Search" }, + i = { ":FzfLua live_grep", "Live Grep" }, + l = { ":FzfLua grep_last", "Last Grep Search" }, + r = { ":FzfLua live_grep_resume", "Resume Last Search" }, + c = { ":FzfLua grep_cword", "Search Word Under Cursor" }, + v = { ":FzfLua grep_visual", "Search Visual Selection" }, + p = { ":FzfLua grep_project", "Grep Search in Project" }, + }, + }, + T = { + name = "Telescope", + u = { "Telescope frecency", "MRU (Frequency)" }, + r = { "Telescope resume", "Resume last search" }, + b = { "Telescope bookmarks", "Browser Bookmarks" }, + m = { "Telescope marks", "Marks" }, + n = { "Telescope node_modules list", "Node Modules" }, + k = { "Telescope keymaps", "Keymaps" }, + h = { "Telescope help_tags", "Help Tags" }, + t = { "Telescope tags", "Tags" }, + f = { + name = "Find", + s = { "Telescope find_files", "Find Files" }, + a = { "Telescope find_files hidden=true", "Find all files" }, + f = { "Telescope file_browser", "File Browser" }, + l = { "Telescope live_grep", "Live Grep" }, + }, + g = { + name = "Git", + b = { "Telescope git_branches", "Git Branches" }, + s = { "Telescope git_status", "Git Status" }, + }, + }, + S = { + name = "Spectre", + f = { "lua require('spectre').open_file_search()", "File Search" }, + c = { "lua require('spectre').open_visual({select_word=true})", "Search Current Word" }, + }, + }, + t = { + name = "Terminal", + f = { "ToggleTerm direction=float", "Float" }, + h = { "ToggleTerm size=10 direction=horizontal", "Horizontal" }, + l = { "lua _LAZYGIT_TOGGLE()", "LazyGit" }, + n = { "lua _NODE_TOGGLE()", "Node" }, + p = { "lua _PYTHON_TOGGLE()", "Python" }, + t = { "lua _HTOP_TOGGLE()", "Htop" }, + u = { "lua _NCDU_TOGGLE()", "NCDU" }, + v = { "ToggleTerm size=80 direction=vertical", "Vertical" }, + }, + v = { "lua require('export-to-vscode').launch()", "Export to Visual Studio Code" }, + w = { "w!", "Save" }, + z = { + name = "Zen", + g = { "Goyo", "Goyo" }, + z = { "ZenMode", "ZenMode" }, + t = { "Twilight", "Twilight Mode" }, + }, + B = { + name = "Bufferline", + p = { "BufferLinePick", "Pick" }, + x = { "BufferLinePickClose", "Pick to Close" }, + }, + E = { + name = "Explorer", + a = { "NvimTreeFocus", "Focus" }, + c = { "NvimTreeCollapse", "Collapse Folders" }, + f = { "NvimTreeFindFile", "Find File" }, + r = { "NvimTreeRefresh", "Refresh" }, + }, + F = { "FzfLua live_grep", "Find Text" }, + G = { + name = "Git & GitHub", + b = { "BlamerToggle", "Blame Line" }, + g = { "GBInteractive", "Git Blame in GitHub" }, + h = { "GHInteractive", "Open in GitHub" }, + }, + L = { + name = "LSP", + c = { "vim.lsp.buf.code_action", "Code Action" }, + b = { "FzfLua blines", "Buffer Lines" }, + f = { "vim.lsp.buf.formatting", "Formatting" }, + l = { "vim.diagnostic.setloclist", "Set Loclist" }, + r = { "vim.lsp.buf.rename", "Rename" }, + t = { "vim.lsp.buf.type_definition", "Type Definition" }, + w = { "function() print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", "List Workspace Folder" }, + a = { "vim.lsp.buf.add_workspace_folder", "Add Workspace" }, + v = { "vim.lsp.buf.remove_workspace_folder", "Remove Workspace" }, + }, + P = { "Telescope projects", "Projects" }, + Q = { "q!", "Quit" }, + R = { "luafile %", "Reload File" }, + T = { + name = "Text Editing", + s = { ":set spell!", "Spell Checking" }, + d = { "call SpellEn()", "Set Spelling Language to English" }, + e = { "call SpellDe()", "Set Spelling Languate to German" }, + w = { "call ToggleWrap()", "Soft wrap/No wrap" }, + c = { "call ToggleColorColumn()", "Show/Hide Colorcolumn" }, + m = { "MarkdownPreviewToggle", "Markdown Preview" }, + }, + V = { + name = "Vimux", + p = { "VimuxPromptCommand", "Run Prompt Command" }, + l = { "VimuxRunLastCommand", "Run Last Command" }, + t = { "VimuxTogglePane", "Toggle Pane" }, + j = { "RunJest", "Run Jest" }, + b = { "RunJestOnBuffer", "Run Jest on Buffer" }, + f = { "RunJestFocused", "Run Jest on Focused" }, + }, +} + +local setup = { + plugins = { + marks = true, -- shows a list of your marks on ' and ` + registers = true, -- shows your registers on " in NORMAL or in INSERT mode + spelling = { + enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions + suggestions = 20, -- how many suggestions should be shown in the list? + }, + -- the presets plugin, adds help for a bunch of default keybindings in Neovim + -- No actual key bindings are created + presets = { + operators = false, -- adds help for operators like d, y, ... and registers them for motion / text object completion + motions = false, -- adds help for motions + text_objects = false, -- help for text objects triggered after entering an operator + windows = true, -- default bindings on + nav = true, -- misc bindings to work with windows + z = true, -- bindings for folds, spelling and others prefixed with z + g = true, -- bindings for prefixed with g + }, + }, + -- add operators that will trigger motion and text object completion + -- to enable all native operators, set the preset / operators plugin above + -- operators = { gc = "Comments" }, + key_labels = { + -- override the label used to display some keys. It doesn’t effect WK in any other way. + -- For example: + -- [""] = "SPC", + -- [""] = "RET", + -- [""] = "TAB", + }, + icons = { + breadcrumb = "»", -- symbol used in the command line area that shows your active key combo + separator = "➜", -- symbol used between a key and it’s label + group = "+", -- symbol prepended to a group + }, + popup_mappings = { + scroll_down = "", -- binding to scroll down inside the popup + scroll_up = "", -- binding to scroll up inside the popup + }, + window = { + border = "rounded", -- none, single, double, shadow + position = "bottom", -- bottom, top + margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] + padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] + winblend = 0, + }, + layout = { + height = { min = 4, max = 25 }, -- min and max height of the columns + width = { min = 20, max = 50 }, -- min and max width of the columns + spacing = 3, -- spacing between columns + align = "left", -- align columns left, center or right + }, + ignore_missing = true, -- enable this to hide mappings for which you didn’t specify a label + hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate + show_help = true, -- show help message on the command line when the popup is visible + triggers = "auto", -- automatically setup triggers + -- triggers = {""} -- or specify a list manually + triggers_blacklist = { + -- list of mode / prefixes that should never be hooked by WhichKey + -- this is mostly relevant for key maps that start with a native binding + -- most people should not need to change this + i = { "j", "k" }, + v = { "j", "k" }, + }, +} + +local opts = { + mode = "n", -- NORMAL mode + prefix = "", + buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings + silent = true, -- use `silent` when creating keymaps + noremap = true, -- use `noremap` when creating keymaps + nowait = true, -- use `nowait` when creating keymaps +} + +local vopts = { + mode = "v", -- VISUAL mode + prefix = "", + buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings + silent = true, -- use `silent` when creating keymaps + noremap = true, -- use `noremap` when creating keymaps + nowait = true, -- use `nowait` when creating keymaps +} + +local vmappings = { + ["/"] = { 'lua require("Comment.api").toggle_linewise_op(vim.fn.visualmode())', "Comment" }, +} + +which_key.setup(setup) +which_key.register(mappings, opts) +which_key.register(vmappings, vopts) diff --git a/nvim/mappings.vim b/nvim/mappings.vim deleted file mode 100644 index 4f05c1e..0000000 --- a/nvim/mappings.vim +++ /dev/null @@ -1,137 +0,0 @@ -" *** *** *** Key Mappings *** *** *** -" ************************************ - -" Quick toggle between buffers -noremap j :b# - -" Add semicolon or comma to the end of the line -nnoremap ;; A; -nnoremap ,, A, - -" Maintain the cursor position when yanking a visual selection -vnoremap y myy`y -vnoremap Y myY`y - -" Delete last character of line -nnoremap x $x - -" Open vim config in a new buffer, reload vim config -nnoremap ve :e $MYVIMRC -nnoremap vr :source $MYVIMRC - -" Delete current buffer -nnoremap X :bd - -" Delete all buffers -nnoremap da :bufdo bdelete - -" Save current buffer -nnoremap sf :w - -" Allow gf to open non-existent files -map gf :edit - -" Reselect visual selection after indenting -vnoremap < >gv - -" Set spell checker to `s` -" zg (good), zG (good temp), zw (wrong), zW (wrong temp) -nnoremap rs :set spell! - -" Switch off highlighting -nnoremap h :nohlsearch - -" Toogle list -nnoremap l :set list! - -" Indent the whole source code -nnoremap pf gg=G'' - -" Reverse the mark mapping -nnoremap ' ` -nnoremap ` ' - -" Visuall select of just pasted content -nnoremap gp `[v`] -nnoremap gy `[v`]y - -" When text is wrapped, move by terminal rows, not lines, unless a count is provided -noremap j (v:count == 0 ? 'gj' : 'j') -noremap k (v:count == 0 ? 'gk' : 'k') - -" Open a quickfix window for the last search -nnoremap ? :execute 'vimgrep /'.@/.'/g %':copen - -" Faster linewise scrolling -noremap 3 -noremap 3 - -" Keep the window centered -noremap G Gzzzv -noremap n nzzzv -noremap N Nzzzv -noremap } }zzzv -noremap { {zzzv - -" Close all buffers -nnoremap XX :qa - -" Add lines in NORMAL Mode -nnoremap gn ok -nnoremap gN Oj - -" Change to the folder of the current file -nnoremap cf :cd %:p:h:pwd - -" Quickfix Window -nnoremap qo :copen -nnoremap qc :cclose - -" Exit INSERT MODE with 'jk' -inoremap jj - -" Reformat a line into a block -nnoremap q gqip - -" Reformat a block into a line -nnoremap qq vipJ - -" Easier split navigation -nnoremap -nnoremap -nnoremap -nnoremap - -" Mapping for easier OmniCompletion -inoremap -inoremap -inoremap -inoremap -inoremap - -" Remap Jump to Tag -nnoremap ü -nnoremap Ü - -" Open for Markdown in iA Writer -nnoremap ia :silent !open -a iA\ Writer.app '%:p' - -" Custom Text Objects -let pairs = { ":" : ":", - \ "." : ".", - \ "" : "", - \ "*" : "*", - \ "-" : "-", - \ "_" : "_" } - -for [key, value] in items(pairs) - exe "nnoremap ci".key." T".key."ct".value - exe "nnoremap ca".key." F".key."cf".value - exe "nnoremap vi".key." T".key."vt".value - exe "nnoremap va".key." F".key."vf".value - exe "nnoremap di".key." T".key."dt".value - exe "nnoremap da".key." F".key."df".value - exe "nnoremap yi".key." T".key."yt".value - exe "nnoremap ya".key." F".key."yf".value -endfor diff --git a/nvim/plugin-config.vim b/nvim/plugin-config.vim deleted file mode 100644 index 927b501..0000000 --- a/nvim/plugin-config.vim +++ /dev/null @@ -1,36 +0,0 @@ -" *** *** *** Plugin Configuration *** *** *** -" ******************************************** - -source ~/.config/nvim/plugin-config/autopairs.lua -source ~/.config/nvim/plugin-config/base16.vim -source ~/.config/nvim/plugin-config/blamer.vim -source ~/.config/nvim/plugin-config/bookmarks.vim -source ~/.config/nvim/plugin-config/bufferline.lua -source ~/.config/nvim/plugin-config/cmp.lua -source ~/.config/nvim/plugin-config/colorizer.lua -source ~/.config/nvim/plugin-config/diagnosticls-configs.lua -source ~/.config/nvim/plugin-config/export-to-vscode.lua -source ~/.config/nvim/plugin-config/fugitive.vim -source ~/.config/nvim/plugin-config/fzf.lua -source ~/.config/nvim/plugin-config/gitsigns.lua -source ~/.config/nvim/plugin-config/vim-gh-line.vim -source ~/.config/nvim/plugin-config/goyo.vim -source ~/.config/nvim/plugin-config/harpoon.lua -source ~/.config/nvim/plugin-config/lsp-config.vim -source ~/.config/nvim/plugin-config/lsp-installer.lua -source ~/.config/nvim/plugin-config/lspkind.lua -source ~/.config/nvim/plugin-config/lualine.lua -source ~/.config/nvim/plugin-config/neoscroll.lua -source ~/.config/nvim/plugin-config/pandoc.vim -source ~/.config/nvim/plugin-config/neoformat.vim -source ~/.config/nvim/plugin-config/sidebar.lua -source ~/.config/nvim/plugin-config/speeddating.vim -source ~/.config/nvim/plugin-config/telescope.lua -source ~/.config/nvim/plugin-config/tree.lua -source ~/.config/nvim/plugin-config/treesitter.lua -source ~/.config/nvim/plugin-config/trouble.lua -source ~/.config/nvim/plugin-config/ultisnips.vim -source ~/.config/nvim/plugin-config/vim-easymotion.vim -source ~/.config/nvim/plugin-config/vim-commentary.vim -source ~/.config/nvim/plugin-config/vimux.vim -source ~/.config/nvim/plugin-config/web-devicons.lua diff --git a/nvim/plugin-config/autopairs.lua b/nvim/plugin-config/autopairs.lua deleted file mode 100644 index 4172e24..0000000 --- a/nvim/plugin-config/autopairs.lua +++ /dev/null @@ -1,9 +0,0 @@ --- nvim-autopairs --- https://github.com/windwp/nvim-autopairs - -local status, autopairs = pcall(require, 'nvim-autopairs') -if (not status) then return end - -autopairs.setup({ - disable_filetype = { 'TelescopePrompt', 'vim' }, -}) diff --git a/nvim/plugin-config/base16.vim b/nvim/plugin-config/base16.vim deleted file mode 100644 index 5341472..0000000 --- a/nvim/plugin-config/base16.vim +++ /dev/null @@ -1,7 +0,0 @@ -" Base16 Vim -" https://github.com/chriskempson/base16-vim - -if filereadable(expand("~/.vimrc_background")) - let base16colorspace=256 - source ~/.vimrc_background -endif diff --git a/nvim/plugin-config/blamer.vim b/nvim/plugin-config/blamer.vim deleted file mode 100644 index a729701..0000000 --- a/nvim/plugin-config/blamer.vim +++ /dev/null @@ -1,9 +0,0 @@ -" blamer.vim -" https://github.com/APZelos/blamer.nvim - -" Settings -let g:blamer_enabled = 0 -let g:blamer_relative_time = 1 - -" Mappings -nnoremap tb :BlamerToggle diff --git a/nvim/plugin-config/bookmarks.vim b/nvim/plugin-config/bookmarks.vim deleted file mode 100644 index 67dbe8c..0000000 --- a/nvim/plugin-config/bookmarks.vim +++ /dev/null @@ -1,5 +0,0 @@ -" vim-bookmarks -" https://github.com/MattesGroeger/vim-bookmarks - -let g:bookmark_center = 1 -let g:bookmark_auto_close = 1 diff --git a/nvim/plugin-config/bufferline.lua b/nvim/plugin-config/bufferline.lua deleted file mode 100644 index 9602482..0000000 --- a/nvim/plugin-config/bufferline.lua +++ /dev/null @@ -1,55 +0,0 @@ --- bufferline.nvim --- https://github.com/akinsho/bufferline.nvim - -local status, bufferline = pcall(require, 'bufferline') -if (not status) then return end - -bufferline.setup({ - highlights = { - fill = { - guibg = "#282828" - }, - separator_selected = { - guifg = "#282828" - }, - separator_visible = { - guifg = "#282828" - }, - separator = { - guifg = "#282828" - } - }, - options = { - modified_icon = "●", - left_trunc_marker = "", - right_trunc_marker = "", - max_name_length = 25, - max_prefix_length = 25, - enforce_regular_tabs = false, - view = "multiwindow", - show_buffer_close_icons = true, - show_close_icon = false, - separator_style = "thin", - diagnostics = "nvim_lsp", - diagnostics_update_in_insert = false, - diagnostics_indicator = function(count, level, diagnostics_dict, context) - return "("..count..")" - end, - offsets = { - { - filetype = "NvimTree", - text = "File Explorer", - highlight = "Directory", - text_align = "left" - } - } - } -}) - --- Mappings -local opts = { noremap = true, silent = true } - -vim.api.nvim_set_keymap('n', 'tp', [[:BufferLinePick]], opts) -vim.api.nvim_set_keymap('n', 'tx', [[:BufferLinePickClose]], opts) -vim.api.nvim_set_keymap('n', 'H', [[:BufferLineCyclePrev]], opts) -vim.api.nvim_set_keymap('n', 'L', [[:BufferLineCycleNext]], opts) diff --git a/nvim/plugin-config/cmp.lua b/nvim/plugin-config/cmp.lua deleted file mode 100644 index e32a7b8..0000000 --- a/nvim/plugin-config/cmp.lua +++ /dev/null @@ -1,53 +0,0 @@ --- nvim-cmp --- https://github.com/hrsh7th/nvim-cmp - -local status, cmp = pcall(require, 'cmp') -if (not status) then return end - -cmp.setup({ - auto_select = false, - snippet = { - expand = function(args) - vim.fn["UltiSnips#Anon"](args.body) - end - }, - mapping = { - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.complete(), - [''] = cmp.config.disable, - [''] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - [''] = cmp.mapping({ - i = cmp.mapping.confirm({ select = true }), - c = cmp.mapping.confirm({ select = false }), - }), - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'ultisnips' }, - { name = 'nvim_lua' }, - { name = 'path' }, - { name = 'omni' }, - { name = 'buffer', keyword_length = 3 }, - { name = 'npm', keyword_length = 4 }, - }, - formatting = { - format = require('lspkind').cmp_format { - with_text = true, - menu = { - buffer = "[buf]", - nvim_lsp = "[LSP]", - path = "[path]", - luasnip = "[snip]" - } - } - }, - experimental = { - native_menu = false, - ghost_text = true - } -}) diff --git a/nvim/plugin-config/colorizer.lua b/nvim/plugin-config/colorizer.lua deleted file mode 100644 index 3e38390..0000000 --- a/nvim/plugin-config/colorizer.lua +++ /dev/null @@ -1,17 +0,0 @@ --- colorizer.lua --- https://github.com/norcalli/nvim-colorizer.lua - -local status, colorizer = pcall(require, 'colorizer') -if (not status) then return end - -colorizer.setup(nil, { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = true, -- "Name" codes like Blue - RRGGBBAA = true, -- #RRGGBBAA hex codes - rgb_fn = true, -- CSS rgb() and rgba() functions - hsl_fn = true, -- CSS hsl() and hsla() functions - css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn - mode = "background", -- Set the display mode.) -}) diff --git a/nvim/plugin-config/diagnosticls-configs.lua b/nvim/plugin-config/diagnosticls-configs.lua deleted file mode 100644 index 0291eea..0000000 --- a/nvim/plugin-config/diagnosticls-configs.lua +++ /dev/null @@ -1,53 +0,0 @@ --- diagnosticls-configs-nvim --- https://github.com/creativenull/diagnosticls-configs-nvim#setup - -local status, dlsconfig = pcall(require, 'diagnosticls-configs') -if (not status) then return end - --- npm install -g diagnostic-languageserver eslint_d prettier_d_slim prettier -local eslint = require('diagnosticls-configs.linters.eslint') -local standard = require('diagnosticls-configs.linters.standard') -local prettier = require('diagnosticls-configs.formatters.prettier') -local prettier_standard = require('diagnosticls-configs.formatters.prettier_standard') - -local function on_attach(client) - print('Attached to ' .. client.name) -end - -dlsconfig.init({ - default_config = true, - format = true, - on_attach = on_attach, -}) - -prettier.requiredFiles = { - '.prettierrc', - '.prettierrc.json', - '.prettierrc.toml', - '.prettierrc.json', - '.prettierrc.yml', - '.prettierrc.yaml', - '.prettierrc.json5', - '.prettierrc.js', - '.prettierrc.cjs', - 'prettier.config.js', - 'prettier.config.cjs', -} - -dlsconfig.setup({ - ['javascript'] = { - linter = { eslint, standard }, - formatter = { prettier, prettier_standard }, - }, - ['javascriptreact'] = { - linter = { eslint, standard }, - formatter = { prettier, prettier_standard } - }, - ['css'] = { - formatter = prettier - }, - ['html'] = { - formatter = prettier - }, -}) - diff --git a/nvim/plugin-config/export-to-vscode.lua b/nvim/plugin-config/export-to-vscode.lua deleted file mode 100644 index c33ddb0..0000000 --- a/nvim/plugin-config/export-to-vscode.lua +++ /dev/null @@ -1,4 +0,0 @@ ---- export-to-vscode.nvim --- https://github.com/elijahmanor/export-to-vscode.nvim - -vim.api.nvim_set_keymap('n', 'code', 'lua require("export-to-vscode").launch()', { noremap = true, silent = true }) diff --git a/nvim/plugin-config/fugitive.vim b/nvim/plugin-config/fugitive.vim deleted file mode 100644 index c6ee52f..0000000 --- a/nvim/plugin-config/fugitive.vim +++ /dev/null @@ -1,6 +0,0 @@ -" fugitive.vim -" https://github.com/tpope/vim-fugitive - -nnoremap gd :Gvdiffsplit! -nnoremap gdh :diffget //2 -nnoremap gdl :diffget //3 diff --git a/nvim/plugin-config/fzf.lua b/nvim/plugin-config/fzf.lua deleted file mode 100644 index b882c13..0000000 --- a/nvim/plugin-config/fzf.lua +++ /dev/null @@ -1,25 +0,0 @@ --- fzf.nvim --- https://github.com/nvim-telescope/telescope.nvim/ - ---- Mappings -local opts = { noremap = true, silent = true } - -vim.api.nvim_set_keymap('n', '', [[Files]], opts) -vim.api.nvim_set_keymap('n', 'b', [[Buffers]], opts) -vim.api.nvim_set_keymap('n', 'gs', [[GFiles?]], opts) -vim.api.nvim_set_keymap('n', 'fc', [[Commits]], opts) -vim.api.nvim_set_keymap('n', 'fbc', [[BCommits]], opts) -vim.api.nvim_set_keymap('n', 'ht', [[Helptags]], opts) -vim.api.nvim_set_keymap('n', 'r', [[Rg]], opts) -vim.api.nvim_set_keymap('n', 'rf', [[Rg!]], opts) -vim.api.nvim_set_keymap('n', 't', [[Tags]], opts) -vim.api.nvim_set_keymap('n', 'm', [[Marks]], opts) -vim.api.nvim_set_keymap('n', 'km', [[Maps]], opts) -vim.api.nvim_set_keymap('n', 'fl', [[Lines]], opts) -vim.api.nvim_set_keymap('n', 'fbl', [[BLines]], opts) -vim.api.nvim_set_keymap('n', 'w', [[Windows]], opts) -vim.api.nvim_set_keymap('n', 'mru', [[History]], opts) -vim.api.nvim_set_keymap('n', 'ch', [[History:]], opts) -vim.api.nvim_set_keymap('n', 'sh', [[History/]], opts) -vim.api.nvim_set_keymap('n', 'fs', [[Snippets]], opts) -vim.api.nvim_set_keymap('n', 'ff', [[Filetypes]], opts) diff --git a/nvim/plugin-config/gitsigns.lua b/nvim/plugin-config/gitsigns.lua deleted file mode 100644 index aba9446..0000000 --- a/nvim/plugin-config/gitsigns.lua +++ /dev/null @@ -1,7 +0,0 @@ --- gitsigns.nvim --- https://github.com/lewis6991/gitsigns.nvim - -local status, gitsigns = pcall(require, 'gitsigns') -if (not status) then return end - -gitsigns.setup() diff --git a/nvim/plugin-config/harpoon.lua b/nvim/plugin-config/harpoon.lua deleted file mode 100644 index 6d5c61a..0000000 --- a/nvim/plugin-config/harpoon.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Harpoon --- https://github.com/ThePrimeagen/harpoon - -local status, harpoon = pcall(require, 'harpoon') -if (not status) then return end - -harpoon.setup() - --- Mappings -local opts = { noremap = true, silent = true } - -vim.api.nvim_set_keymap('n', 'a', [[lua require('harpoon.mark').add_file()]], opts) -vim.api.nvim_set_keymap('n', ',', [[lua require('harpoon.ui').toggle_quick_menu()]], opts) -vim.api.nvim_set_keymap('n', '1', [[lua require('harpoon.ui').nav_file(1)]], opts) -vim.api.nvim_set_keymap('n', '2', [[lua require('harpoon.ui').nav_file(2)]], opts) -vim.api.nvim_set_keymap('n', '3', [[lua require('harpoon.ui').nav_file(3)]], opts) -vim.api.nvim_set_keymap('n', '4', [[lua require('harpoon.ui').nav_file(4)]], opts) diff --git a/nvim/plugin-config/lsp-config.vim b/nvim/plugin-config/lsp-config.vim deleted file mode 100644 index 863aa83..0000000 --- a/nvim/plugin-config/lsp-config.vim +++ /dev/null @@ -1,21 +0,0 @@ -" lspconfig -" https://github.com/neovim/nvim-lspconfig - -" Mappings -nnoremap lua vim.lsp.buf.signature_help() -nnoremap D lua vim.lsp.buf.type_definition() -nnoremap q lua vim.lsp.diagnostic.set_loclist() -nnoremap rn lua vim.lsp.buf.rename() -nnoremap wa lua vim.lsp.buf.add_workspace_folder() -nnoremap wl lua print(vim.inspect(vim.lsp.buf.list_workspace_folders())) -nnoremap wr lua vim.lsp.buf.remove_workspace_folder() -nnoremap K lua vim.lsp.buf.hover() -nnoremap g0 lua vim.lsp.buf.document_symbol() -nnoremap gD lua vim.lsp.buf.declaration() -nnoremap gW lua vim.lsp.buf.workspace_symbol() -nnoremap ga lua vim.lsp.buf.code_action() -nnoremap gd lua vim.lsp.buf.definition() -nnoremap gi lua vim.lsp.buf.implementation() -nnoremap gr lua vim.lsp.buf.references() -nnoremap Ä lua vim.lsp.diagnostic.goto_prev() -nnoremap ä lua vim.lsp.diagnostic.goto_next() diff --git a/nvim/plugin-config/lsp-installer.lua b/nvim/plugin-config/lsp-installer.lua deleted file mode 100644 index 1524500..0000000 --- a/nvim/plugin-config/lsp-installer.lua +++ /dev/null @@ -1,63 +0,0 @@ --- nvim-lsp-installer --- https://github.com/williamboman/nvim-lsp-installer - -local status, lsp_installer = pcall(require, 'nvim-lsp-installer') -if (not status) then return end - -local servers = { - bashls = {}, - cssls = {}, - diagnosticls = {}, - dockerls = {}, - emmet_ls = {}, - eslint = {}, - graphql = {}, - html = {}, - jsonls = {}, - pyright = {}, - sumneko_lua = { - settings = { - Lua = { - diagnostics = { - globals = {"vim", "hs"}, - }, - }, - }, - }, - stylelint_lsp = {}, - svelte = {}, - tailwindcss = {}, - tsserver = {}, - vimls = {}, - vuels = {}, - yamlls = {}, -} - -lsp_installer.settings({ - ui = { - icons = { - server_installed = "✓", - server_pending = "➜", - server_uninstalled = "✗" - }, - }, - - max_concurrent_installers = 4, -}) - --- Register a handler that will be called for all installed servers. -lsp_installer.on_server_ready(function(server) - local opts = { - capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()), - } - - if servers[server.name] then - opts = servers[server.name] - end - - -- This setup() function is exactly the same as lspconfig's setup function. - -- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md - server:setup(opts) - - vim.cmd([[do User LspAttachBuffers]]) -end) diff --git a/nvim/plugin-config/lspkind.lua b/nvim/plugin-config/lspkind.lua deleted file mode 100644 index fac5c49..0000000 --- a/nvim/plugin-config/lspkind.lua +++ /dev/null @@ -1,7 +0,0 @@ --- lspkind-nvim --- https://github.com/onsails/lspkind-nvim - -local status, lspkind = pcall(require, 'lspkind') -if (not status) then return end - -lspkind.init({}) diff --git a/nvim/plugin-config/lualine.lua b/nvim/plugin-config/lualine.lua deleted file mode 100644 index 5abc696..0000000 --- a/nvim/plugin-config/lualine.lua +++ /dev/null @@ -1,41 +0,0 @@ --- lualine.nvim --- https://github.com/nvim-lualine/lualine.nvim - -local status, lualine = pcall(require, 'lualine') -if (not status) then return end - -require('lualine').setup { - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = {}, - always_divide_middle = true, - globalstatus = false, - }, - sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff', 'diagnostics'}, - lualine_c = { - { - 'filename', - file_status = true, - path = 1, - } - }, - lualine_x = {'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - extensions = {} -} diff --git a/nvim/plugin-config/neoformat.vim b/nvim/plugin-config/neoformat.vim deleted file mode 100644 index 2e7068a..0000000 --- a/nvim/plugin-config/neoformat.vim +++ /dev/null @@ -1,18 +0,0 @@ -" Neoformat -" https://github.com/sbdchd/neoformat - -" Settings -let g:neoformat_try_node_exe = 1 -let g:neoformat_run_all_formatters = 1 -let g:neoformat_basic_format_align = 0 " Disable alignment -let g:neoformat_basic_format_retab = 1 " Enable tab to spaces conversion -let g:neoformat_basic_format_trim = 1 " Enable trimmming of trailing whitespace - -" Mappings -nnoremap nf Neoformat - -" Auto Commands -augroup fmt - autocmd! - autocmd BufWritePre * undojoin | Neoformat -augroup END diff --git a/nvim/plugin-config/neoscroll.lua b/nvim/plugin-config/neoscroll.lua deleted file mode 100644 index acd8812..0000000 --- a/nvim/plugin-config/neoscroll.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Neoscroll --- https://github.com/karb94/neoscroll.nvim - -local status, neoscroll = pcall(require, 'neoscroll') -if (not status) then return end - -neoscroll.setup() diff --git a/nvim/plugin-config/pandoc.vim b/nvim/plugin-config/pandoc.vim deleted file mode 100644 index 4353ed1..0000000 --- a/nvim/plugin-config/pandoc.vim +++ /dev/null @@ -1,6 +0,0 @@ -" vim-pandoc -" https://github.com/vim-pandoc/vim-pandoc - -let g:pandoc#modules#disabled = ["folding", "chdir"] -let g:pandoc#spell#default_langs = ['de_de', 'en_us'] -let g:pandoc#spell#enabled = 0 diff --git a/nvim/plugin-config/prettier.vim b/nvim/plugin-config/prettier.vim deleted file mode 100644 index b941c5a..0000000 --- a/nvim/plugin-config/prettier.vim +++ /dev/null @@ -1,18 +0,0 @@ -" Settings -let g:prettier#autoformat = 1 -let g:prettier#autoformat_require_pragma = 0 -let g:prettier#exec_cmd_async = 1 -let g:prettier#exec_cmd_path = "/usr/local/bin/prettier" - -" Autocommands -augroup prettier - autocmd! - autocmd FileType css,scss let b:prettier_exec_cmd = 'prettier-stylelint' - autocmd BufWritePre *.js PrettierAsync - autocmd BufWritePre *.jsx PrettierAsync - autocmd BufWritePre *.ts PrettierAsync - autocmd BufWritePre *.tsx PrettierAsync - autocmd BufWritePre *.css PrettierAsync - autocmd BufWritePre *.scss PrettierAsync - autocmd BufWritePre *.md PrettierAsync -augroup END diff --git a/nvim/plugin-config/sidebar.lua b/nvim/plugin-config/sidebar.lua deleted file mode 100644 index 187bf9a..0000000 --- a/nvim/plugin-config/sidebar.lua +++ /dev/null @@ -1,9 +0,0 @@ -local status, sidebar = pcall(require, 'sidebar-nvim') -if (not status) then return end - -sidebar.setup() - ---- Mappings -local opts = { noremap = true, silent = true } - -vim.api.nvim_set_keymap('n', 'ts', [[:SidebarNvimToggle]], opts) diff --git a/nvim/plugin-config/speeddating.vim b/nvim/plugin-config/speeddating.vim deleted file mode 100644 index 7a94960..0000000 --- a/nvim/plugin-config/speeddating.vim +++ /dev/null @@ -1,4 +0,0 @@ -" speeddating.vim -" https://github.com/tpope/vim-speeddating - -autocmd VimEnter * SpeedDatingFormat %d.%m.%Y diff --git a/nvim/plugin-config/telescope.lua b/nvim/plugin-config/telescope.lua deleted file mode 100644 index 0af7aff..0000000 --- a/nvim/plugin-config/telescope.lua +++ /dev/null @@ -1,86 +0,0 @@ --- telescope.nvim --- https://github.com/nvim-telescope/telescope.nvim/ - -local status, telescope = pcall(require, 'telescope') -if (not status) then return end - -telescope.setup({ - defaults = { - file_ignore_pattern = { 'yarn.lock' } - }, - extensions = { - lsp_handlers = { - disable = {}, - location = { - telescope = {}, - no_results_message = 'No references found', - }, - symbol = { - telescope = {}, - no_results_message = 'No symbols found', - }, - call_hierarchy = { - telescope = {}, - no_results_message = 'No calls found', - }, - code_action = { - telescope = require('telescope.themes').get_dropdown({}), - no_results_message = 'No code actions available', - prefix = '', - }, - }, - bookmarks = { - selected_browser = 'brave', - url_open_command = 'open', - } - }, - fzf = { - fuzzy = true, - override_generic_sorter = false, - override_file_sorter = true, - case_mode = "smart_case" - }, - buffers = { - show_all_buffers = true, - sort_lastused = true, - -- theme = "dropdown", - -- previewer = false, - mappings = { - i = { - [""] = "delete_buffer", - } - } - } -}) - ---- Extensions -require('telescope').load_extension('bookmarks') -require('telescope').load_extension('frecency') -require('telescope').load_extension('fzf') -require('telescope').load_extension('harpoon') -require('telescope').load_extension('lsp_handlers') -require('telescope').load_extension('node_modules') - ---- Mappings -local opts = { noremap = true, silent = true } - -vim.api.nvim_set_keymap('n', 'bh', [[Telescope bookmarks]], opts) -vim.api.nvim_set_keymap('n', 'cheat', [[:Cheatsheet]], opts) -vim.api.nvim_set_keymap('n', 'fcb', [[Telescope git_branches]], opts) -vim.api.nvim_set_keymap('n', 'fnm', [[Telescope node_modules list]], opts) --- vim.api.nvim_set_keymap('n', 'fr', [[Telescope resume]], opts) --- vim.api.nvim_set_keymap('n', '', [[Telescope find_files]], opts) --- vim.api.nvim_set_keymap('n', 'b', [[Telescope buffers]], opts) --- vim.api.nvim_set_keymap('n', 'fb', [[Telescope buffers]], opts) --- vim.api.nvim_set_keymap('n', 'fc', [[Telescope git_status]], opts) --- vim.api.nvim_set_keymap('n', 'ff', [[lua require('telescope.builtin').find_files({ hidden = true })]], opts) --- vim.api.nvim_set_keymap('n', 'fht', [[Telescope help_tags]], opts) --- vim.api.nvim_set_keymap('n', 'frg', [[Telescope live_grep]], opts) --- vim.api.nvim_set_keymap('n', 'fs', [[lua require('telescope.builtin').file_browser({ cwd = vim.fn.expand('%:p:h') })]], opts) --- vim.api.nvim_set_keymap('n', 'ft', [[Telescope tags]], opts) --- vim.api.nvim_set_keymap('n', 'km', [[Telescope keymaps]], opts) --- vim.api.nvim_set_keymap('n', 'm', [[Telescope marks]], opts) --- vim.api.nvim_set_keymap('n', 'mru', [[Telescope frecency]], opts) --- vim.api.nvim_set_keymap('n', 'ps', [[lua require('telescope.builtin').grep_string({ search = vim.fn.input('Grep for > ') })]], opts) --- vim.api.nvim_set_keymap('n', 'r', [[Telescope live_grep]], opts) --- vim.api.nvim_set_keymap('n', 't', [[Telescope tags]], opts) diff --git a/nvim/plugin-config/tree.lua b/nvim/plugin-config/tree.lua deleted file mode 100644 index fbfe86c..0000000 --- a/nvim/plugin-config/tree.lua +++ /dev/null @@ -1,109 +0,0 @@ --- nvim-tree.lua --- https://github.com/kyazdani42/nvim-tree.lua - -local status, nvim_tree = pcall(require, 'nvim-tree') -if (not status) then return end - -require'nvim-tree'.setup { - auto_reload_on_write = true, - disable_netrw = false, - hide_root_folder = false, - hijack_cursor = false, - hijack_netrw = true, - hijack_unnamed_buffer_when_opening = false, - ignore_buffer_on_setup = false, - open_on_setup = false, - open_on_setup_file = false, - open_on_tab = false, - sort_by = "name", - update_cwd = false, - view = { - width = 50, - height = 30, - side = "left", - preserve_window_proportions = false, - number = false, - relativenumber = false, - signcolumn = "yes", - mappings = { - custom_only = false, - list = { - -- user mappings go here - }, - }, - }, - hijack_directories = { - enable = true, - auto_open = true, - }, - update_focused_file = { - enable = false, - update_cwd = false, - ignore_list = {}, - }, - ignore_ft_on_setup = {}, - system_open = { - cmd = nil, - args = {}, - }, - diagnostics = { - enable = false, - show_on_dirs = false, - icons = { - hint = "", - info = "", - warning = "", - error = "", - }, - }, - filters = { - dotfiles = false, - custom = {}, - exclude = {}, - }, - git = { - enable = true, - ignore = true, - timeout = 400, - }, - actions = { - change_dir = { - enable = true, - global = false, - }, - open_file = { - quit_on_open = false, - resize_window = false, - window_picker = { - enable = true, - chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", - exclude = { - filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, - buftype = { "nofile", "terminal", "help" }, - }, - }, - }, - }, - trash = { - cmd = "trash", - require_confirm = true, - }, - log = { - enable = false, - truncate = false, - types = { - all = false, - config = false, - copy_paste = false, - git = false, - profile = false, - }, - }, -} - ---- Mappings -local opts = { noremap = true, silent = true } - -vim.api.nvim_set_keymap('n', 'nt', [[:NvimTreeToggle]], opts) -vim.api.nvim_set_keymap('n', 'ntf', [[:NvimTreeFindFile]], opts) -vim.api.nvim_set_keymap('n', 'ntr', [[:NvimTreeRefresh]], opts) diff --git a/nvim/plugin-config/treesitter.lua b/nvim/plugin-config/treesitter.lua deleted file mode 100644 index c950b6b..0000000 --- a/nvim/plugin-config/treesitter.lua +++ /dev/null @@ -1,41 +0,0 @@ --- nvim-treesitter --- https://github.com/nvim-treesitter/nvim-treesitter - -local status, treesitter = pcall(require, 'nvim-treesitter') -if (not status) then return end - -treesitter.setup { - ensure_installed = { - 'bash', - 'css', - 'dockerfile', - 'graphql', - 'html', - 'javascript', - 'jsdoc', - 'json', - 'lua', - 'python', - 'ruby', - 'scss', - 'svelte', - 'toml', - 'tsx', - 'typescript', - 'vim', - 'vue', - 'yaml', - }, - highlight = { - enable = true, - disable = {}, - additional_vim_regex_highlighting = true - }, - indent = { - enable = true, - disable = {}, - }, - context_commentstring = { - enable = true - } -} diff --git a/nvim/plugin-config/trouble.lua b/nvim/plugin-config/trouble.lua deleted file mode 100644 index c512743..0000000 --- a/nvim/plugin-config/trouble.lua +++ /dev/null @@ -1,12 +0,0 @@ --- Trouble --- https://github.com/folke/trouble.nvim - -local status, trouble = pcall(require, 'trouble') -if (not status) then return end - -trouble.setup() - ---- Mappings -local opts = { noremap = true, silent = true } - -vim.api.nvim_set_keymap('n', 'tt', [[:TroubleToggle]], opts) diff --git a/nvim/plugin-config/ultisnips.vim b/nvim/plugin-config/ultisnips.vim deleted file mode 100644 index 10e8286..0000000 --- a/nvim/plugin-config/ultisnips.vim +++ /dev/null @@ -1,13 +0,0 @@ -" UltiSnips -" https://github.com/SirVer/ultisnips - -let g:UltiSnipsSnippetDirectories = ["ultisnips"] -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" -let g:UltiSnipsEditSplit="vertical" -let g:ultisnips_javascript = { - \ 'keyword-spacing': 'always', - \ 'semi': 'always', - \ 'space-before-function-paren': 'never' - \ } diff --git a/nvim/plugin-config/vim-commentary.vim b/nvim/plugin-config/vim-commentary.vim deleted file mode 100644 index b35fead..0000000 --- a/nvim/plugin-config/vim-commentary.vim +++ /dev/null @@ -1,6 +0,0 @@ -" commentary.vim -" https://github.com/tpope/vim-commentary - -autocmd FileType apache setlocal commentstring=#\ %s -autocmd FileType gspec setlocal commentstring=#\ %s -autocmd FileType eruby setlocal commentstring= diff --git a/nvim/plugin-config/vim-easymotion.vim b/nvim/plugin-config/vim-easymotion.vim deleted file mode 100644 index 21c9ccc..0000000 --- a/nvim/plugin-config/vim-easymotion.vim +++ /dev/null @@ -1,10 +0,0 @@ -" vim-easymotion -" https://github.com/easymotion/vim-easymotion - -" f{char} to move to {char} -map f (easymotion-bd-f) -nmap f (easymotion-overwin-f) - -" Move to line -map L (easymotion-bd-jk) -nmap L (easymotion-overwin-line) diff --git a/nvim/plugin-config/vim-gh-line.vim b/nvim/plugin-config/vim-gh-line.vim deleted file mode 100644 index 5371fe0..0000000 --- a/nvim/plugin-config/vim-gh-line.vim +++ /dev/null @@ -1,4 +0,0 @@ -" vim-gh-line -" https://github.com/ruanyl/vim-gh-line - -let g:gh_github_domain = "source.xing.com" diff --git a/nvim/plugin-config/vimux.vim b/nvim/plugin-config/vimux.vim deleted file mode 100644 index 0b43c2b..0000000 --- a/nvim/plugin-config/vimux.vim +++ /dev/null @@ -1,14 +0,0 @@ -" Vimux -" https://github.com/preservim/vimux - -let g:VimuxHeight = "30" -let g:VimuxOrientation = 'h' -let g:VimuxUseNearestPane = 0 - -" Mappings -nmap vt :VimuxTogglePane -nmap vp :VimuxPromptCommand -nmap vl :VimuxRunLastCommand -nmap vj :RunJest -nmap vjb :RunJestOnBuffer -nmap vjf :RunJestFocused diff --git a/nvim/plugin-config/web-devicons.lua b/nvim/plugin-config/web-devicons.lua deleted file mode 100644 index 29aa162..0000000 --- a/nvim/plugin-config/web-devicons.lua +++ /dev/null @@ -1,10 +0,0 @@ --- nvim-web-devicons --- https://github.com/kyazdani42/nvim-web-devicons - -local status, web_devicons = pcall(require, 'nvim-web-devicons') -if (not status) then return end - -web_devicons.setup({ - override = {}, - default = true, -}) diff --git a/nvim/plugins.vim b/nvim/plugins.vim deleted file mode 100644 index bb0ae68..0000000 --- a/nvim/plugins.vim +++ /dev/null @@ -1,117 +0,0 @@ -" *** *** *** Plugins *** *** *** -" ******************************* - -" Automatically install vim-plug -let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' -if empty(glob(data_dir . '/autoload/plug.vim')) - silent execute '!curl -fLo ' . data_dir . '/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC -endif - -call plug#begin(data_dir . '/plugins') - -" Language Server Protocol -Plug 'neovim/nvim-lspconfig' -Plug 'williamboman/nvim-lsp-installer' -Plug 'folke/trouble.nvim' -Plug 'onsails/lspkind-nvim' -Plug 'creativenull/diagnosticls-configs-nvim' - -" Completion -Plug 'hrsh7th/nvim-cmp' -Plug 'hrsh7th/cmp-nvim-lsp' -Plug 'hrsh7th/cmp-buffer' -Plug 'hrsh7th/cmp-path' -Plug 'hrsh7th/cmp-cmdline' -Plug 'SirVer/ultisnips' -Plug 'honza/vim-snippets' -Plug 'quangnguyen30192/cmp-nvim-ultisnips' -Plug 'David-Kunz/cmp-npm' - -" File Management & File Editing -Plug 'APZelos/blamer.nvim' -Plug 'MattesGroeger/vim-bookmarks' -Plug 'ThePrimeagen/harpoon' -Plug 'bogado/file-line' -Plug 'dhruvmanila/telescope-bookmarks.nvim' -Plug 'gbrlsnchs/telescope-lsp-handlers.nvim' -Plug 'godlygeek/tabular' -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -Plug 'junegunn/fzf.vim' -Plug 'kyazdani42/nvim-tree.lua' -Plug 'lewis6991/gitsigns.nvim' -Plug 'mg979/vim-visual-multi' -Plug 'nvim-lua/plenary.nvim' -Plug 'nvim-lua/popup.nvim' -Plug 'nvim-telescope/telescope-file-browser.nvim' -Plug 'nvim-telescope/telescope-frecency.nvim' -Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' } -Plug 'nvim-telescope/telescope-node-modules.nvim' -Plug 'nvim-telescope/telescope.nvim' -Plug 'sbdchd/neoformat' -Plug 'ruanyl/vim-gh-line' -Plug 'sidebar-nvim/sidebar.nvim' -Plug 'sudormrfbin/cheatsheet.nvim' -Plug 'tami5/sqlite.lua' -Plug 'vim-scripts/VisIncr' -Plug 'windwp/nvim-autopairs' -Plug 'elijahmanor/export-to-vscode.nvim' -Plug 'brooth/far.vim' -Plug 'rstacruz/vim-xtract' - -" Window Improvements -Plug 'akinsho/bufferline.nvim' -Plug 'chriskempson/base16-vim' -Plug 'dstein64/vim-startuptime' -Plug 'hoob3rt/lualine.nvim' -Plug 'junegunn/goyo.vim' -Plug 'karb94/neoscroll.nvim' -Plug 'kyazdani42/nvim-web-devicons' -Plug 'wesQ3/vim-windowswap' -Plug 'yamatsum/nvim-cursorline' - -" Syntax Highlighting -Plug 'JoosepAlviste/nvim-ts-context-commentstring' -Plug 'editorconfig/editorconfig-vim' -Plug 'jparise/vim-graphql' -Plug 'jxnblk/vim-mdx-js' -Plug 'mattn/emmet-vim' -Plug 'norcalli/nvim-colorizer.lua' -Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} -Plug 'peitalin/vim-jsx-typescript' -Plug 'sheerun/vim-polyglot' -Plug 'styled-components/vim-styled-components', { 'branch': 'main' } -Plug 'vim-pandoc/vim-pandoc' -Plug 'vim-pandoc/vim-pandoc-syntax' -Plug 'pantharshit00/vim-prisma' - -" Custom Text Objects -Plug 'christoomey/vim-titlecase' -Plug 'glts/vim-textobj-comment' " ac, ic, aC -Plug 'jceb/vim-textobj-uri' " au, iu, go -Plug 'kana/vim-textobj-datetime' " ada, add, adf, adt, adz, ida, … -Plug 'kana/vim-textobj-user' -Plug 'michaeljsmith/vim-indent-object' " ai, ii, aI, iI -Plug 'whatyouhide/vim-textobj-xmlattr' " ax, ix - -" Custom Motions -Plug 'christoomey/vim-sort-motion' " gs -Plug 'tommcdo/vim-exchange' " cx, cxx, X, cxc -Plug 'easymotion/vim-easymotion' " f/L - -" Tpope -Plug 'tpope/vim-abolish' -Plug 'tpope/vim-commentary' -Plug 'tpope/vim-eunuch' -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-repeat' -Plug 'tpope/vim-speeddating' -Plug 'tpope/vim-surround' - -" TMUX -Plug 'christoomey/vim-tmux-navigator' -Plug 'preservim/vimux' -Plug 'tyewang/vimux-jest-test' - -call plug#end() -doautocmd User PlugLoaded diff --git a/nvim/settings.vim b/nvim/settings.vim deleted file mode 100644 index ab18e8d..0000000 --- a/nvim/settings.vim +++ /dev/null @@ -1,83 +0,0 @@ -" *** *** *** Global Settings *** *** *** -" *************************************** - -set expandtab -set autowrite -set showbreak=↪ -set ignorecase -set smartcase -set list -set listchars=tab:∙\ ,trail:·,nbsp:.,extends:❯,precedes:❮ -set visualbell -set termguicolors -set number -set relativenumber -set backspace=indent,eol,start " Intuitive backspacing -set hidden -set iskeyword+=- " Add dashes to words -set cpoptions+=$ " Don't delete the word, but put a $ to the end till exit the mode -set title -set shortmess=caoOtI " Welcome screen -set tabstop=2 -set shiftwidth=2 -set softtabstop=2 -set expandtab -set copyindent -set shiftround -set mouse=a -set clipboard=unnamedplus -set nowrap -set confirm -set spelllang=de_de,en_us -set timeoutlen=500 -set signcolumn=yes:2 -set foldlevel=2 -set foldlevelstart=99 -set foldmethod=syntax -set foldnestmax=10 -set splitbelow -set splitright -set scrolloff=8 -set sidescrolloff=8 -set virtualedit=all -set cursorline -set path+=** -set nobackup -set nowritebackup -set noswapfile -set undofile -set redrawtime=10000 " Allow more time for loading syntax on large files -set complete+=i,k,s,kspell -set completeopt=menu,menuone,preview -set wildmode=longest:full,full -set omnifunc=syntaxcomplete#Complete -set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case -set grepformat=%f:%l:%c:%m - -" Spell Checker -set spellfile+=~/.config/nvim/spell/de.utf-8.add " (1)zg, (1)zw -set spellfile+=~/.vim/spell/en.utf-8.add " 2zg, 2zw - -" Custom Dictionaries ( ) -set dictionary+=~/.config/nvim/dictionary/de_user.txt -set dictionary+=~/.config/nvim/dictionary/de_neu.txt -set dictionary+=~/.config/nvim/dictionary/en_us.txt - -" Custom Thesauri (Synonyms) ( ) -set thesaurus+=~/.config/nvim/thesaurus/de_user.txt -set thesaurus+=~/.config/nvim/thesaurus/de_openthesaurus.txt - -" Python paths -let g:python_host_prog=$HOME.'/.pyenv/versions/neovim2/bin/python' -let g:python3_host_prog=$HOME.'/.pyenv/versions/neovim3/bin/python' - -" Custom Colors -highlight ColorColumn guibg=#202224 -highlight SpellBad guifg=red - -" Show VCS conflict marker -match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' - -" Leader -let mapleader = "\" - diff --git a/nvim/spell/de.utf-8.add b/nvim/spell/de.utf-8.add old mode 100644 new mode 100755 index 4db6e04..e69de29 --- a/nvim/spell/de.utf-8.add +++ b/nvim/spell/de.utf-8.add @@ -1,200 +0,0 @@ -Imhoff -kogakure -Ninjutsu -Bujinkan -Wolfburg -Masaaki -Hatsumi -Dumrath -Fassnacht -Arbeitsverzeichnis -Zeichencodierung -XING -Karriereplanung -Webdesigner -Vim -TextMate -Javascript -Nervenpunkte -Atemi -Schlagdosierung -Trefferzonen -Dakentaijutsu -Koppojutsu -Knochenbrechtechniken -Koshijutsu -Körperwaffen -abzuhärten -Körperwaffe -Bleischrot -Speerhand -Takamatsu -Seishin -Teki -Kyoyo -Taijutsu -taijutsu -Jutai -jutsu -Greiftechniken -Taihen -Ninjaken -Ninjaschwert -Iaijutsu -Schnellziehen -Kenjutsu -Bojutsu -Rokushakubo -Yonshakubo -Hanbo -Sanshakubo -Tessen -Shinobi -Shuriken -Wurfklingen -shuriken -Senban -Wurfmesser -Yarijutsu -Yari -Kamayari -Hakenspeer -Naginatajutsu -Naginata -Schwertlanze -Bisento -Kusarigama -Sichelwaffen -Kyoketsu -shogei -Kayakujutsu -Hensojutsu -Rollendenken -iri -Gehtechniken -Bajutsu -Suiren -Wassertraining -Wasserbewegungen -Unterwasserkampf -ryaku -Schlachtformationen -Choho -Intonjutsu -Gotonpo -Tenmon -Chimon -Landschaftskunde -Fahrzeugkenntnis -Momochi -Sandaju -Iga -Ryu -Führungspersonen -Schattenkrieger -Nin -Shinobu -Ninjustu -Koga -Vorderfaust -Faustrücken -Handkante -Fersenrücken -Knöchelfaust -Sinusknochen -Kehlkopfdeckel -Kehlkopfgrube -schwert -Schlüsselbeinvertiefung -Nervendruck -Brustbeinfortsatz -Herzspitze -Schulterblattkamm -Spindelbein -Faustkante -Faustunterseite -Schulterlähmung -Körperkondition -Geta -Kampftraining -Tritttechniken -Grundtechniken -Stabkampfes -Kettentechniken -Klingenwerfen -Unterwassertaktiken -Kujiin -Mikkyo -Kujikiri -Shugendo -Saiminjutsu -Fujibayashis -Bansenshukai -Zentralsüdjapan -Fujibayashi -Yasuyoshi -Tokugawa -Hattori -Sengokujidai -Yo -handgebundenen -Leitphilosophie -Militärstrategie -Shoshin -Bewusstwerden -Bewusstseinswerdung -Shochi -Spionagemission -Ausgleichskonzept -Kampfsystems -Nachtaktionen -Verwirrungstaktiken -Mondphasentabellen -Navigationsmethoden -Gezeitentabellen -Kaiserfamilie -Familienzweige -Otomo -Hososto -Heinazae -Nakahattori -Koreyuki -Yasuyori -Heijiro -Yasunori -Shimohattori -Kamihattori -Yahazu -Nihon -Ienaga -Yaguruma -Ichitomoe -Hanzo -Nobunaga -Oda -Mikawa -Takano -Nagaoka -Echigo -Takatori -Yamato -Ochi -Familienzweig -Nazo -Yasunaga -Matsudaira -Chigachi -Heitaro -Uzuchijo -Migawa -Sandayu -Yasutake -Yubano -Ayama -Kunoichi -Nagato -Gotonjutsu -Watari -Mitsuhide -Homebrew -Plugins diff --git a/nvim/spell/de.utf-8.add.spl b/nvim/spell/de.utf-8.add.spl old mode 100644 new mode 100755 index af7ed8f32fdb0f501a650568074976b2e6549172..fdd7910f64ca9288ecc3cc7f184dfd7ea866d47c GIT binary patch literal 57 ycmWIZ^erw(&B-zP&%nT-#F)xh#F)ld%9sLV<$-ZAke$X@&X^CBDPaUEf&u`T*b6oQ literal 2759 zcmX|DON$&;7_ED&J2Scp;zkHz@COK)Y{Y-yB7(^v(i^Gjs;;_SRkzw(Rnrfo31q3k z%peF^2pU(eM8TEF;J6TJW*Hj^WZN(s3AhwJ=esqTW~%Pvd!FxAAG~{~nWbfU_+Jq0 z{rE-{kCSwguqs#U47Do`=r2D?TbW92}@ z{TOr>??!2jgG#9&IN~-_Hom}swzSmfBXVc|NQT)CVgjz4=NH-(%M zE`oxfJ~I89n$#CgoQ%P}#6Ph&y`Ba#a?ldw3^z0IQ;Imev0+-fFo!|wb_Kvv@lRwv zrrpe&D>Rr#B|YDiI7M2}4+H>E%yim;7M5I2poi}yjM6$RtmpT7ePCTkmN?;ar85wJ zM$lq0F~JHKZ&}?)_&)5sr6U&_>%uAIdGr~R6*ZkQPWmHy4aQxKQ);8-yj|&vki~G? ztDk#;Pn$hl--^a5xYk)^9YGVvSPSZuc`qrj&TvyBvp{$>5eh1j5FZ+5%&}lTh6-F9 zLkN)>MPkrlw;!dYt-Iym;^2pjP6f2F*k#th2EsDnuNWVD2DHoyNTq zb;-uSbYbXym4b3J(e=6H2ai3VEFpE7tDpMwQXHeWV9^XR^d}V|5esM#a1QB&E|`Q% z(He|ssJfLSv<;FLj2DJS`ks+MsT&5~&`VscGF3wu5{Fm?4^t?1KBaZRz*@AEKJo|T zo8XuBm0)#5!xMnX=EqC+3ECzpd+J$dk_RP(u}IkU^e#tyYDR+ihEJGl9Rx+*set^&CD7-iZW%m`Q7VKV}SlClL^KtVVWgkPnQm#D*I+#L@yPQvWt+F{U1lv*MUe zuW&&%1)jKmj^s1C=8e?Knq7jaL&$N8+Jx~hXk{knM3il{0{pFL4*p=fOcsd!z1T;|=4RG*+E^Jy`g^0%Oop#A z*Fbo}mUOaI`7kPNH;1Rb2NiISwE`)(Gaa4lF$)_d2IHJa8a#*qKLhXSf-{Hi$+^YO z=jW*Hrzrc7cz=cr!)=Ma)1Pc|?5NY}m=_F53-7KbXC(!#HGiJdt29j~KAwld(?e6ni5F6BQ)dGD$rmpm|2oku(c7H0lhWas0-; z%jh{|yvu2V_r@WqYo`qpE7;_m;Qr&`+Upp9VTIEzzFXM+uzVN|@EjGkSzxOUzK11n-}n?Nftq`$#)bCJ1_5NHs$q5Gf`)nc { - $0 -}; -endsnippet - -snippet edf "Export default function in ES6 syntax" b -export default (${1:params}) => { - $0 -}; -endsnippet - -snippet ecl "Export default class in ES6 syntax" b -export default class ${1:className} { - $0 -}; -endsnippet - -snippet ece "Export default class which extends a base one in ES6 syntax" b -export default class ${1:className} extends ${2:baseclassName} { - $0 -}; -endsnippet - -snippet con "Add default constructor in a class in ES6 syntax" b -constructor(${1:params}) { - ${0} -} -endsnippet - -snippet met "Creates a method inside a class in ES6 syntax" b -${1:methodName}(${2:params}) { - ${0} -} -endsnippet - -snippet fre "Creates a forEach statement in ES6 syntax" b -${1:array}.forEach(${2:currentItem} => { - ${0} -}); -endsnippet - -snippet fof "Iterating over property names of iterable objects" b -for (const ${1:item} of ${2:object}) { - ${0} -} -endsnippet - -snippet fin "Iterating over property values of iterable objects" b -for (const ${1:item} in ${2:object}) { - ${0} -} -endsnippet - -snippet anfn "Creates an anonymous function in ES6 syntax" b -(${1:params}) => { - ${2} -} -endsnippet - -snippet nfn "Creates a named function in ES6 syntax" b -const ${1:name} = (${2:params}) => { - ${3} -} -endsnippet - -snippet dob "Creates and assigns a local variable using object destructing" b -const {${2:propertyName}} = ${1:objectToDestruct}; -endsnippet - -snippet dar "Creates and assigns a local variable using array destructing" b -const [${2:propertyName}] = ${1:arrayToDestruct}; -endsnippet - -snippet sti "Executes the given function at specified intervals in ES6 syntax" b -setInterval(() => { - ${2} -}, ${0:intervalInms}); -endsnippet - -snippet sto "Executes the given function after the specified delay in ES6 syntax" b -setTimeout(() => { - ${2} -}, ${1:delayInms}); -endsnippet - -snippet prom "Creates and returns a new Promise in the standard ES6 syntax" b -return new Promise((resolve, reject) => { - ${1} -}); -endsnippet - -snippet thenc "Add the .then and .catch methods to handle promises" b -.then((${1:result}) => { - ${2} -}).catch((${3:err}) => { - ${4} -}); -endsnippet - -snippet cco "Writes the the number of times that count() has been invoked at the same line and with the same label" b -console.count(${1:label}); -endsnippet - -snippet cdi "Prints a JavaScript representation of the specified object" b -console.dir(${1:object}); -endsnippet - -snippet cer "Displays a message in the console and also includes a stack trace from where the method was called" b -console.error(${1:object}); -endsnippet - -snippet cgr "Groups and indents all following output by an additional level, until console.groupEnd() is called." b -console.group("${1:label}"); -endsnippet - -snippet cge "Closes out the corresponding console.group()." b -console.groupEnd(); -endsnippet - -snippet clg "Displays a message in the console" b -console.log(${1:object}); -endsnippet - -snippet clo "Displays an object in the console with its name" b -console.log(\{${1:object}\}); -endsnippet - -snippet cwa "Displays a message in the console but also displays a yellow warning icon along with the logged message" b -console.warn(${1:object}); -endsnippet - -snippet cin "Displays a message in the console but also displays a blue information icon along with the logged message" b -console.info(${1:object}); -endsnippet - -snippet clt "Displays tabular data as a table." b -console.table(${1:object}); -endsnippet - diff --git a/setup/brew.sh b/setup/brew.sh index b8a4c2a..4b79956 100755 --- a/setup/brew.sh +++ b/setup/brew.sh @@ -20,6 +20,7 @@ brew install ack # Search tool like grep, but optimized f brew install bash # Bourne-Again SHell, a UNIX command interpreter brew install bat # Clone of cat(1) with syntax highlighting and Git integration brew install bfg # Remove large files or passwords from Git history like git-filter-branch +brew install bibclean # BibTeX bibliography file pretty printer and syntax checker brew install bitwarden-cli # Secure and free password manager for all of your devices brew install cairo # Vector graphics library with cross-device output support brew install cloc # Statistics utility to count lines of code @@ -28,6 +29,7 @@ brew install cmake # Cross-platform make brew install coreutils # GNU File, Shell, and Text utilities brew install curl # Get a file from an HTTP, HTTPS or FTP server brew install denisidoro/tools/navi # An interactive cheatsheet tool for the command-line ➜ navi +brew install deno # Secure runtime for JavaScript and TypeScript brew install direnv # Load/unload environment variables based on $PWD brew install docker # Pack, ship and run any application as a lightweight container brew install docker-machine # Create Docker hosts locally and on cloud providers @@ -51,7 +53,9 @@ brew install gource # Version Control Visualization Tool brew install gpg # GNU Pretty Good Privacy (PGP) brew install grex # Command-line tool for generating regular expressions brew install gsl # Numerical library for C and C++ +brew install gnu-sed # GNU implementation of the famous stream editor brew install highlight # Convert source code to formatted text with syntax highlighting +brew install htop # Improved top brew install httpie # User-friendly cURL replacement (command-line HTTP client brew install hub # Add GitHub support to git on the command-line brew install icu4c # C/C++ and Java libraries for Unicode and globalization @@ -63,6 +67,7 @@ brew install lazygit # Simple terminal UI for git commands brew install libdvdcss # Access DVDs as block devices without the decryption brew install libpng # Library for manipulating PNG images brew install lua # Powerful, lightweight programming language +brew install luarocks # LuaRocks is the package manager for Lua modules. brew install lynx # Text-based web browser brew install m-cli # Swiss Army Knife for macOS brew install mas # Mac App Store command-line interface @@ -70,6 +75,7 @@ brew install memcached # High performance, distributed memory o brew install mongodb # High-performance, schema-free, document-oriented database brew install multimarkdown # Turn marked-up plain text into well-formatted documents brew install mysql # Open source relational database management system +brew install ncdu # NCurses Disk Usage brew install neovim --HEAD # NeoVim brew install ossp-uuid # ISO-C API and CLI for generating UUIDs brew install pandoc # Swiss-army knife of markup format conversion @@ -89,6 +95,7 @@ brew install ripgrep # Search tool like grep and The Silver S brew install rsync # Utility that provides fast incremental file transfer brew install ruby # Powerful, clean, object-oriented scripting language brew install ruby-build # Install various Ruby versions and implementations +brew install rust # Rust language brew install scala # JVM-based programming language brew install slugify # Convert filenames and directories to a web friendly format brew install sqlite # Command-line interface for SQLite @@ -101,6 +108,7 @@ brew install tmuxinator # Create and manage tmux sessions easily brew install tree # Display directories as trees (with optional color/HTML output) brew install universal-ctags/universal-ctags/universal-ctags --HEAD # A maintained ctag implementation brew install urlview # URL extractor/launcher (needed for tmux-urlview) +brew install vale # Syntax-aware linter for prose brew install watchman # Watch files and take action when they change brew install wget # Internet file retriever brew install yarn # JavaScript package manager diff --git a/setup/gem.sh b/setup/gem.sh index 5fa5758..90189db 100755 --- a/setup/gem.sh +++ b/setup/gem.sh @@ -7,3 +7,4 @@ brew gem install git-up # git command to fetch and rebase all branches brew gem install github-linguist # Language Savant. brew gem install lunchy # Friendly wrapper around launchctl brew gem install neovim # Ruby provider for NeoVim +brew gem install erb_lint # Lint ERB or HTML diff --git a/setup/init.sh b/setup/init.sh index de841b4..e8a560d 100755 --- a/setup/init.sh +++ b/setup/init.sh @@ -24,6 +24,12 @@ source ./npm.sh # Installing Python version manager source ./python.sh +# Installing Lua packages +source ./lua.sh + +# Installing Rust packages +source ./rust.sh + # Install current version of Ruby source ./ruby.sh diff --git a/setup/lua.sh b/setup/lua.sh new file mode 100755 index 0000000..5c4514f --- /dev/null +++ b/setup/lua.sh @@ -0,0 +1,3 @@ + #!/bin/sh + +luarocks install --server=https://luarocks.org/dev luaformatter diff --git a/setup/npm.sh b/setup/npm.sh index 45415b5..90d208a 100755 --- a/setup/npm.sh +++ b/setup/npm.sh @@ -24,11 +24,13 @@ npm install -g eslint-plugin-mocha npm install -g eslint-plugin-node npm install -g eslint-plugin-react npm install -g eslint-plugin-redux +npm install -g eslint_d # Like Eslint, but faster npm install -g fast-cli # Test your download speed using fast.com ➜ fast npm install -g gifify # Convert any video file to an optimized animated GIF npm install -g glyphhanger # Your web font utility belt npm install -g http-server # A simple zero-configuration command-line http server npm install -g json-server # Small JSON file server for REST API mock ➜ touch db.json; json-server --watch db.json +npm install -g jsonlint # A JSON linter npm install -g lighthouse # Lighthouse analyzes web apps and web pages. npm install -g nativefier # Wrap web apps natively npm install -g neovim # Node.js provider for NeoVim @@ -37,9 +39,12 @@ npm install -g nodemon # Simple monitor script for use during npm install -g npm-check # Check for outdated, incorrect, and unused dependencies. ➜ npm-check -g npm install -g npm-check-updates # Find newer versions of dependencies ➜ ncu npm install -g npx # Executes commands +npm install -g markdownlint # Markdown lint tool and style checker +npm install -g markdownlint-cli # Command Line Interface for MarkdownLint npm install -g pageres-cli # Capture website screenshots ➜ pageres [ todomvc.com 1200x1000 ] [ yeoman.io 800x600 1200x1000 ] --crop npm install -g prettier # Prettier is an opinionated code formatter -npm install -g prettier-stylelint +npm install -g prettier-stylelint # Format your styles with ease +npm install -g prettier_d_slim # Prettier, but fast npm install -g prettyjson # Package for formatting JSON data ➜ prettyjson package.json. curl https://api.github.com/users/rafeca | prettyjson npm install -g stylelint # Modern CSS linter npm install -g stylelint-config-prettier @@ -47,5 +52,6 @@ npm install -g stylelint-config-standard npm install -g tldr # tldr; npm install -g typescript # TypeScript is a language for application scale JavaScript development npm install -g typesync # Install missing TypeScript typings for dependencies in your package.json. +npm install -g writegood # Linter for English prose npm install -g yarn # Fast, reliable, and secure dependency management. diff --git a/setup/python.sh b/setup/python.sh index 718c203..b4e6b40 100755 --- a/setup/python.sh +++ b/setup/python.sh @@ -9,20 +9,16 @@ export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv virtualenv-init -)" -pyenv install 2.7.17 pyenv install 3.10.1 -pip3 install fawkes - -pyenv virtualenv 2.7.17 neovim2 -pyenv virtualenv 3.10.1 neovim3 - -pyenv activate neovim2 -pip2 install neovim - -pyenv activate neovim3 -pip3 install neovim - -pip3 install awscli - -pyenv deactivate +pip install fawkes +pip install autopep8 +pip install black +pip install yamllint +pip install vim-vint +pip install gitlint +pip install codespell +pip install proselint +pip install flake8 +pip install neovim +pip install awscli diff --git a/setup/rust.sh b/setup/rust.sh new file mode 100755 index 0000000..8638dca --- /dev/null +++ b/setup/rust.sh @@ -0,0 +1,3 @@ + #!/bin/sh + +cargo install stylua diff --git a/tmux.conf b/tmux.conf index efa66a6..beb9fbb 100644 --- a/tmux.conf +++ b/tmux.conf @@ -28,17 +28,17 @@ setw -g mode-keys vi set -g renumber-windows on # Status Bar +set-window-option -g status-style fg='#A3AAB7',bg='#2C323C' # Background + set-window-option -g status-left-length 300 -set-window-option -g status-left " #S " -set-window-option -g status-left-style fg=black,bg=white +set-window-option -g status-left '#[fg=#2C323C,bg=#98C379] #S #[fg=#98C379,bg=#2C323C] ' # Left Side -set-window-option -g status-right " #{battery_percentage} · %d.%m.%Y %H:%M " -set-window-option -g status-right-style fg=black,bg=white +set-window-option -g status-right '#[fg=#3E4452,bg=#2C323C]#[fg=#A3AAB7,bg=#3E4452] ﮣ #{battery_percentage} ' +set-window-option -ga status-right '#[fg=#98C379,bg=#3E4452]#[fg=#282C34,bg=#98C379] %a %d.%m.%Y %H:%M ' # Right Side -set-window-option -g window-status-format " #I: #W" +set-window-option -g window-status-format '#[fg=#A3AAB7,bg=#2C323C] #I · #W' # Inactive Tab -set-window-option -g window-status-current-format " #I: #W " -set-window-option -g window-status-current-style fg=green,bg=black +set-window-option -g window-status-current-format '#[fg=#A3AAB7,bg=#2C323C]#[fg=#A3AAB7,bg=#3E4452]#[fg=#3E4452,bg=#A3AAB7]  · #W #[fg=#A3AAB7,bg=#2C323C]' # Active Tab # Swap Window to Position 1 bind-key T swap-window -t 1 diff --git a/tmuxinator/website-hamburg-stefanimhoff.de.yml b/tmuxinator/website-hamburg-stefanimhoff-de.yml similarity index 79% rename from tmuxinator/website-hamburg-stefanimhoff.de.yml rename to tmuxinator/website-hamburg-stefanimhoff-de.yml index 9d2ec6b..447f1e5 100644 --- a/tmuxinator/website-hamburg-stefanimhoff.de.yml +++ b/tmuxinator/website-hamburg-stefanimhoff-de.yml @@ -1,4 +1,4 @@ -name: Hamburg +name: hamburg-stefanimhoff-de root: ~/Code/Github/hamburg.stefanimhoff.de/ windows: - Vim: vim diff --git a/tmuxinator/website-kogakure.de.yml b/tmuxinator/website-kogakure-de.yml similarity index 83% rename from tmuxinator/website-kogakure.de.yml rename to tmuxinator/website-kogakure-de.yml index 6bdda26..58c4306 100644 --- a/tmuxinator/website-kogakure.de.yml +++ b/tmuxinator/website-kogakure-de.yml @@ -1,4 +1,4 @@ -name: 木隠 +name: 'kogakure-de' root: ~/Code/Github/kogakure.de/ windows: - Vim: vim diff --git a/tmuxinator/website-stefanimhoff.de.yml b/tmuxinator/website-stefanimhoff-de.yml similarity index 83% rename from tmuxinator/website-stefanimhoff.de.yml rename to tmuxinator/website-stefanimhoff-de.yml index 01a8a56..299395d 100644 --- a/tmuxinator/website-stefanimhoff.de.yml +++ b/tmuxinator/website-stefanimhoff-de.yml @@ -1,4 +1,4 @@ -name: "Stefan Imhoff" +name: stefanimhoff-de root: ~/Code/Github/stefanimhoff.de/ windows: - Vim: vim diff --git a/tmuxinator/xing-measurements.yml b/tmuxinator/xing-measurements.yml new file mode 100644 index 0000000..3e51e25 --- /dev/null +++ b/tmuxinator/xing-measurements.yml @@ -0,0 +1,7 @@ +name: Measurements +root: ~/Code/XING/component-scanner/ +windows: + - Vim: vim + - Backend: clear + - Frontend: cd ~/Code/XING/component-scanner-frontend/ + - Extension: cd ~/Code/XING/chrome-extension-xds-component/ diff --git a/zshrc b/zshrc index 798f7cd..d777104 100644 --- a/zshrc +++ b/zshrc @@ -44,6 +44,9 @@ export NVM_DIR="$HOME/.nvm" # Rancher export PATH="$HOME/.rd/bin:$PATH" +# Rust +export PATH="$HOME/.cargo/bin:$PATH" + # Ruby export PATH="/usr/local/opt/ruby/bin:$PATH"