commit 6cf9b3eb278b96cedc746530bf79ce4ba71dcf5e Author: Thomas Peterson Date: Tue Dec 16 12:58:26 2025 +0100 Dotfiles diff --git a/bin/bluetuith b/bin/bluetuith new file mode 100755 index 0000000..ad6ea59 Binary files /dev/null and b/bin/bluetuith differ diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl new file mode 100644 index 0000000..53245fc --- /dev/null +++ b/niri/.config/niri/config.kdl @@ -0,0 +1,381 @@ +workspace "1" +workspace "2" +workspace "3" +workspace "4" +workspace "5" +workspace "6" +workspace "7" +workspace "8" +input { + keyboard { + xkb { + layout "de" + options "caps:swapescape" + } + numlock + } + touchpad { + tap + natural-scroll + } + mouse { + } + + trackpoint { + } + workspace-auto-back-and-forth +} +output "DP-3" { + mode "2560x1440@60" + scale 1 + position x=0 y=0 +} + +output "DP-1" { + mode "2560x1440@60" + scale 1 + position x=2560 y=0 +} + +output "eDP-1" { + mode "3840x2160@60" + scale 2 + position x=5120 y=0 +} + +layout { + gaps 10 + + center-focused-column "never" + + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + + default-column-width { proportion 0.5; } + + focus-ring { + width 2 + active-color "orange" + inactive-color "#505050" + } + + border { + off + width 4 + active-color "#ffc87f" + inactive-color "#505050" + urgent-color "#9b0000" + } + + shadow { + on + softness 30 + spread 5 + offset x=0 y=5 + color "#0007" + } + struts { + // left 64 + // right 64 + // top 64 + // bottom 64 + } +} + +spawn-at-startup "~/projekte/xwayland-satellite/target/release/xwayland-satellite" + +environment { + DISPLAY ":0" +} +prefer-no-csd +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" +animations { + // Uncomment to turn off all animations. + // off + + // Slow down all animations by this factor. Values below 1 speed them up instead. + // slowdown 3.0 +} + +window-rule { + match app-id=r#"^org\.wezfurlong\.wezterm$"# + default-column-width {} +} + +workspace "SF" + +window-rule { + match app-id="SF" + open-on-workspace "SF" + open-floating true +} + +spawn-at-startup "alacritty" "--class" "SF" "--command" "yazi" + + +window-rule { + match app-id=r#"firefox$"# title="^Picture-in-Picture$" + open-floating true +} + +window-rule { + geometry-corner-radius 0 + clip-to-geometry true +} + +binds { + Mod+Shift+Slash { show-hotkey-overlay; } + + // Suggested binds for running programs: terminal, app launcher, screen locker. + Mod+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; } + Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } + Mod+G hotkey-overlay-title="Run an Browser" { spawn "google-chrome" "--ozone-platform=wayland"; } + Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } + + // You can also use a shell. Do this if you need pipes, multiple commands, etc. + // Note: the entire command goes as a single argument in the end. + // Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; } + + // Example volume keys mappings for PipeWire & WirePlumber. + // The allow-when-locked=true property makes them work even when the session is locked. + XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; } + XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; } + XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + + // Example brightness key mappings for brightnessctl. + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "+1%"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "1%-"; } + + // Open/close the Overview: a zoomed-out view of workspaces and windows. + // You can also move the mouse into the top-left hot corner, + // or do a four-finger swipe up on a touchpad. + Mod+O repeat=false { toggle-overview; } + + Mod+Q repeat=false { close-window; } + + Mod+Left { focus-column-left; } + Mod+Down { focus-window-down; } + Mod+Up { focus-window-up; } + Mod+Right { focus-column-right; } + Mod+H { focus-column-left; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + Mod+L { focus-column-right; } + + Mod+Ctrl+Left { move-column-left; } + Mod+Ctrl+Down { move-window-down; } + Mod+Ctrl+Up { move-window-up; } + Mod+Ctrl+Right { move-column-right; } + Mod+Ctrl+H { move-column-left; } + Mod+Ctrl+J { move-window-down; } + Mod+Ctrl+K { move-window-up; } + Mod+Ctrl+L { move-column-right; } + + // Alternative commands that move across workspaces when reaching + // the first or last window in a column. + // Mod+J { focus-window-or-workspace-down; } + // Mod+K { focus-window-or-workspace-up; } + // Mod+Ctrl+J { move-window-down-or-to-workspace-down; } + // Mod+Ctrl+K { move-window-up-or-to-workspace-up; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+Ctrl+Home { move-column-to-first; } + Mod+Ctrl+End { move-column-to-last; } + + Mod+Shift+Left { focus-monitor-left; } + Mod+Shift+Down { focus-monitor-down; } + Mod+Shift+Up { focus-monitor-up; } + Mod+Shift+Right { focus-monitor-right; } + Mod+Shift+H { focus-monitor-left; } + Mod+Shift+J { focus-monitor-down; } + Mod+Shift+K { focus-monitor-up; } + Mod+Shift+L { focus-monitor-right; } + + Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } + Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } + Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } + Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } + Mod+Shift+Ctrl+H { move-column-to-monitor-left; } + Mod+Shift+Ctrl+J { move-column-to-monitor-down; } + Mod+Shift+Ctrl+K { move-column-to-monitor-up; } + Mod+Shift+Ctrl+L { move-column-to-monitor-right; } + + // Alternatively, there are commands to move just a single window: + // Mod+Shift+Ctrl+Left { move-window-to-monitor-left; } + // ... + + // And you can also move a whole workspace to another monitor: + // Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; } + // ... + + Mod+Page_Down { focus-workspace-down; } + Mod+Page_Up { focus-workspace-up; } + Mod+U { focus-workspace-down; } + Mod+I { focus-workspace-up; } + Mod+Ctrl+Page_Down { move-column-to-workspace-down; } + Mod+Ctrl+Page_Up { move-column-to-workspace-up; } + Mod+Ctrl+U { move-column-to-workspace-down; } + Mod+Ctrl+I { move-column-to-workspace-up; } + + // Alternatively, there are commands to move just a single window: + // Mod+Ctrl+Page_Down { move-window-to-workspace-down; } + // ... + + Mod+Shift+Page_Down { move-workspace-down; } + Mod+Shift+Page_Up { move-workspace-up; } + Mod+Shift+U { move-workspace-down; } + Mod+Shift+I { move-workspace-up; } + + // You can bind mouse wheel scroll ticks using the following syntax. + // These binds will change direction based on the natural-scroll setting. + // + // To avoid scrolling through workspaces really fast, you can use + // the cooldown-ms property. The bind will be rate-limited to this value. + // You can set a cooldown on any bind, but it's most useful for the wheel. + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + + Mod+WheelScrollRight { focus-column-right; } + Mod+WheelScrollLeft { focus-column-left; } + Mod+Ctrl+WheelScrollRight { move-column-right; } + Mod+Ctrl+WheelScrollLeft { move-column-left; } + + // Usually scrolling up and down with Shift in applications results in + // horizontal scrolling; these binds replicate that. + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } + + // Similarly, you can bind touchpad scroll "ticks". + // Touchpad scrolling is continuous, so for these binds it is split into + // discrete intervals. + // These binds are also affected by touchpad's natural-scroll, so these + // example binds are "inverted", since we have natural-scroll enabled for + // touchpads by default. + // Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; } + // Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; } + + // You can refer to workspaces by index. However, keep in mind that + // niri is a dynamic workspace system, so these commands are kind of + // "best effort". Trying to refer to a workspace index bigger than + // the current workspace count will instead refer to the bottommost + // (empty) workspace. + // + // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on + // will all refer to the 3rd workspace. + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + Mod+Ctrl+1 { move-column-to-workspace 1; } + Mod+Ctrl+2 { move-column-to-workspace 2; } + Mod+Ctrl+3 { move-column-to-workspace 3; } + Mod+Ctrl+4 { move-column-to-workspace 4; } + Mod+Ctrl+5 { move-column-to-workspace 5; } + Mod+Ctrl+6 { move-column-to-workspace 6; } + Mod+Ctrl+7 { move-column-to-workspace 7; } + Mod+Ctrl+8 { move-column-to-workspace 8; } + Mod+Ctrl+9 { move-column-to-workspace 9; } + + // Alternatively, there are commands to move just a single window: + // Mod+Ctrl+1 { move-window-to-workspace 1; } + + // Switches focus between the current and the previous workspace. + // Mod+Tab { focus-workspace-previous; } + + // The following binds move the focused window in and out of a column. + // If the window is alone, they will consume it into the nearby column to the side. + // If the window is already in a column, they will expel it out. + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + + // Consume one window from the right to the bottom of the focused column. + Mod+Comma { consume-window-into-column; } + // Expel the bottom window from the focused column to the right. + Mod+Period { expel-window-from-column; } + + Mod+R { switch-preset-column-width; } + Mod+Shift+R { switch-preset-window-height; } + Mod+Ctrl+R { reset-window-height; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + + // Expand the focused column to space not taken up by other fully visible columns. + // Makes the column "fill the rest of the space". + Mod+Ctrl+F { expand-column-to-available-width; } + + Mod+C { center-column; } + + // Center all fully visible columns on screen. + Mod+Ctrl+C { center-visible-columns; } + + // Finer width adjustments. + // This command can also: + // * set width in pixels: "1000" + // * adjust width in pixels: "-5" or "+5" + // * set width as a percentage of screen width: "25%" + // * adjust width as a percentage of screen width: "-10%" or "+10%" + // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0, + // set-column-width "100" will make the column occupy 200 physical screen pixels. + Mod+Minus { set-column-width "-10%"; } + Mod+Plus { set-column-width "+10%"; } + + // Finer height adjustments when in column with other windows. + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Plus { set-window-height "+10%"; } + + // Move the focused window between the floating and the tiling layout. + Mod+V { toggle-window-floating; } + Mod+Shift+V { switch-focus-between-floating-and-tiling; } + + // Toggle tabbed column display mode. + // Windows in this column will appear as vertical tabs, + // rather than stacked on top of each other. + Mod+W { toggle-column-tabbed-display; } + + // Actions to switch layouts. + // Note: if you uncomment these, make sure you do NOT have + // a matching layout switch hotkey configured in xkb options above. + // Having both at once on the same hotkey will break the switching, + // since it will switch twice upon pressing the hotkey (once by xkb, once by niri). + // Mod+Space { switch-layout "next"; } + // Mod+Shift+Space { switch-layout "prev"; } + + Print { screenshot; } + Menu { screenshot; } + Ctrl+Print { screenshot-screen; } + Alt+Print { screenshot-window; } + + // Applications such as remote-desktop clients and software KVM switches may + // request that niri stops processing the keyboard shortcuts defined here + // so they may, for example, forward the key presses as-is to a remote machine. + // It's a good idea to bind an escape hatch to toggle the inhibitor, + // so a buggy application can't hold your session hostage. + // + // The allow-inhibiting=false property can be applied to other binds as well, + // which ensures niri always processes them, even when an inhibitor is active. + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + + // The quit action will show a confirmation dialog to avoid accidental exits. + Ctrl+Alt+Delete { quit; } + + // Powers off the monitors. To turn them back on, do any input like + // moving the mouse or pressing any other key. + Mod+Shift+P { power-off-monitors; } + + Mod+Shift+E hotkey-overlay-title="Files scratchpad" { focus-workspace "SF"; } + +} diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..5ec1a14 --- /dev/null +++ b/nvim/.config/nvim/init.lua @@ -0,0 +1,15 @@ +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +vim.g.have_nerd_font = false + +require 'options' + +require 'autocmd' +require 'keymaps' + +require 'lazy-bootstrap' + +require 'lazy-plugins' + +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..074b5d4 --- /dev/null +++ b/nvim/.config/nvim/lazy-lock.json @@ -0,0 +1,52 @@ +{ + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, + "LuaSnip": { "branch": "master", "commit": "73813308abc2eaeff2bc0d3f2f79270c491be9d7" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, + "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "conform.nvim": { "branch": "master", "commit": "9d859cbfbde7a1bd1770e7c97aef30ec5a237a71" }, + "fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" }, + "flash.nvim": { "branch": "main", "commit": "b68bda044d68e4026c4e1ec6df3c5afd7eb8e341" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "gen.nvim": { "branch": "main", "commit": "c8e1f574d4a3a839dde73a87bdc319a62ee1e559" }, + "gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "59334064f8604ca073791c25dcc5c9698865406e" }, + "lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" }, + "luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "86389a3dd687cfaa647b6f44731e492970034baa" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, + "mini.nvim": { "branch": "main", "commit": "fbb6ad02871d296fc7d3ebd453e1be89b1210f68" }, + "neo-tree.nvim": { "branch": "main", "commit": "f14ac20f98fb62769eaf4de1dc69fbee5fcf3384" }, + "neotest": { "branch": "master", "commit": "2cf3544fb55cdd428a9a1b7154aea9c9823426e8" }, + "neotest-phpunit": { "branch": "main", "commit": "234d00428bbd40e48852e60437f79214142e31e4" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" }, + "nvim-dap": { "branch": "master", "commit": "881f7dc17c0b4204a1d844732f95539575350e5b" }, + "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lint": { "branch": "master", "commit": "9da1fb942dd0668d5182f9c8dee801b9c190e2bb" }, + "nvim-lspconfig": { "branch": "master", "commit": "e688b486fe9291f151eae7e5c0b5a5c4ef980847" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" }, + "phptools.nvim": { "branch": "main", "commit": "a69b141b1310991d22294602c711562b1257b339" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, + "tokyonight.nvim": { "branch": "main", "commit": "4d159616aee17796c2c94d2f5f87d2ee1a3f67c7" }, + "typescript-tools.nvim": { "branch": "master", "commit": "bf11d98ad5736e1cbc1082ca9a03196d45c701f1" }, + "vim-himalaya-ui": { "branch": "master", "commit": "f49f73541b95dba6fd11f2c4bc7cd05ab9dcdc9e" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "which-key.nvim": { "branch": "main", "commit": "904308e6885bbb7b60714c80ab3daf0c071c1492" }, + "zen-mode.nvim": { "branch": "main", "commit": "dfcb72a2dfeedc5342b2ee3a68c83243d682ba3c" } +} diff --git a/nvim/.config/nvim/lua/autocmd.lua b/nvim/.config/nvim/lua/autocmd.lua new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/nvim/.config/nvim/lua/autocmd.lua @@ -0,0 +1 @@ + diff --git a/nvim/.config/nvim/lua/custom/plugins/bufferline.lua b/nvim/.config/nvim/lua/custom/plugins/bufferline.lua new file mode 100644 index 0000000..74920cc --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/bufferline.lua @@ -0,0 +1,10 @@ +return { + { + 'akinsho/bufferline.nvim', + version = '*', + dependencies = 'nvim-tree/nvim-web-devicons', + config = function() + require('bufferline').setup {} + end, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/coverage.lua b/nvim/.config/nvim/lua/custom/plugins/coverage.lua new file mode 100644 index 0000000..4f9f67e --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/coverage.lua @@ -0,0 +1,38 @@ +return { + { + 'andythigpen/nvim-coverage', + version = '*', + dependencies = { + 'nvim-lua/plenary.nvim', + }, + keys = { + { + 'cc', + function() + require('coverage').load() + require('coverage').show() + end, + desc = 'Coverage Load', + }, + { + 'cs', + function() + require('coverage').load() + require('coverage').summary() + end, + desc = 'Coverage Summary', + }, + }, + config = function() + require('coverage').setup { + commands = true, + auto_reload = true, + lang = { + php = { + coverage_file = 'cobertura.xml', + }, + }, + } + end, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/flash.lua b/nvim/.config/nvim/lua/custom/plugins/flash.lua new file mode 100644 index 0000000..047f75c --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/flash.lua @@ -0,0 +1,16 @@ +return { + { + 'folke/flash.nvim', + event = 'VeryLazy', + ---@type Flash.Config + opts = {}, + -- stylua: ignore + keys = { + { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, + { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, + { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, + { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, + { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/init.lua b/nvim/.config/nvim/lua/custom/plugins/init.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/init.lua @@ -0,0 +1 @@ +return {} diff --git a/nvim/.config/nvim/lua/custom/plugins/ki.lua b/nvim/.config/nvim/lua/custom/plugins/ki.lua new file mode 100644 index 0000000..da80fb4 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/ki.lua @@ -0,0 +1,9 @@ +return { + { + 'David-Kunz/gen.nvim', + opts = { + model = 'mistral', + host = '192.168.178.95', + }, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/laserline.lua b/nvim/.config/nvim/lua/custom/plugins/laserline.lua new file mode 100644 index 0000000..87e9fd9 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/laserline.lua @@ -0,0 +1,10 @@ +return { + -- { + -- 'oribarilan/lensline.nvim', + -- tag = '2.0.0', -- or: branch = 'release/2.x' for latest non-breaking updates + -- event = 'LspAttach', + -- config = function() + -- require('lensline').setup() + -- end, + --}, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/mail.lua b/nvim/.config/nvim/lua/custom/plugins/mail.lua new file mode 100644 index 0000000..b3642a9 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/mail.lua @@ -0,0 +1,9 @@ +return { + { + 'aliyss/vim-himalaya-ui', + cmd = { 'HimalayaUI' }, + init = function() + vim.g.himalaya_ui_winwidth = 40 -- Default: 40 + end, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/neotest.lua b/nvim/.config/nvim/lua/custom/plugins/neotest.lua new file mode 100644 index 0000000..c96b410 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/neotest.lua @@ -0,0 +1,90 @@ +return { + { + 'nvim-neotest/neotest', + dependencies = { + 'nvim-neotest/nvim-nio', + 'nvim-lua/plenary.nvim', + 'antoinemadec/FixCursorHold.nvim', + 'nvim-treesitter/nvim-treesitter', + 'olimorris/neotest-phpunit', + }, + keys = { + { 'n', '', desc = '+test' }, + { + 'nt', + function() + require('neotest').run.run(vim.fn.expand '%') + end, + desc = 'Run File (Neotest)', + }, + { + 'nT', + function() + require('neotest').run.run(vim.uv.cwd()) + end, + desc = 'Run All Test Files (Neotest)', + }, + { + 'nr', + function() + require('neotest').run.run() + end, + desc = 'Run Nearest (Neotest)', + }, + { + 'nl', + function() + require('neotest').run.run_last() + end, + desc = 'Run Last (Neotest)', + }, + { + 'ns', + function() + require('neotest').summary.toggle() + end, + desc = 'Toggle Summary (Neotest)', + }, + { + 'no', + function() + require('neotest').output.open { enter = true, auto_close = true } + end, + desc = 'Show Output (Neotest)', + }, + { + 'nO', + function() + require('neotest').output_panel.toggle() + end, + desc = 'Toggle Output Panel (Neotest)', + }, + { + 'nS', + function() + require('neotest').run.stop() + end, + desc = 'Stop (Neotest)', + }, + { + 'nw', + function() + require('neotest').watch.toggle(vim.fn.expand '%') + end, + desc = 'Toggle Watch (Neotest)', + }, + }, + config = function() + require('neotest').setup { + adapters = { + require 'neotest-phpunit' { + phpunit_cmd = function() + return 'vendor/bin/paratest' + end, + filter_dirs = { 'vendor' }, + }, + }, + } + end, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/phptools.lua b/nvim/.config/nvim/lua/custom/plugins/phptools.lua new file mode 100644 index 0000000..28248f3 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/phptools.lua @@ -0,0 +1,31 @@ +return { + { + 'ccaglak/phptools.nvim', + keys = { + { 'lm', 'PhpTools Method' }, + { 'lc', 'PhpTools Class' }, + { 'ls', 'PhpTools Scripts' }, + { 'ln', 'PhpTools Namespace' }, + { 'lg', 'PhpTools GetSet' }, + { 'lf', 'PhpTools Create' }, + { mode = 'v', 'lr', 'PhpTools Refactor' }, + }, + dependencies = { + -- "ccaglak/namespace.nvim", -- optional - php namespace resolver + -- "ccaglak/larago.nvim", -- optional -- laravel goto blade/components + -- "ccaglak/snippets.nvim", -- optional -- native snippet expander + }, + config = function() + require('phptools').setup { + ui = { + enable = true, -- default:true; false only if you have a UI enhancement plugin + fzf = false, -- default:false; tests requires fzf used only in tests module otherwise there might long list of tests + }, + custom_toggles = { -- delete if you dont use it + enable = false, -- default:false + -- { "foo", "bar", "baz" }, -- Add more custom toggle groups here + }, + } + end, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/toggleterm.lua b/nvim/.config/nvim/lua/custom/plugins/toggleterm.lua new file mode 100644 index 0000000..f97b7f1 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/toggleterm.lua @@ -0,0 +1,52 @@ +return { + { + 'akinsho/toggleterm.nvim', + version = '*', + config = function() + local Terminal = require('toggleterm.terminal').Terminal + local lazygit = Terminal:new { + direction = 'float', + float_opts = { + border = 'double', + }, + cmd = 'gitui', + hidden = true, + on_open = function(term) + vim.cmd 'startinsert!' + vim.api.nvim_buf_set_keymap(term.bufnr, 'n', 'q', 'close', { noremap = true, silent = true }) + end, + -- function to run on closing the terminal + on_close = function(term) + vim.cmd 'startinsert!' + end, + } + + local normalterm = Terminal:new { + direction = 'float', + float_opts = { + border = 'double', + }, + hidden = true, + on_open = function(term) + vim.cmd 'startinsert!' + vim.api.nvim_buf_set_keymap(term.bufnr, 'n', 'q', 'close', { noremap = true, silent = true }) + end, + -- function to run on closing the terminal + on_close = function(term) + vim.cmd 'startinsert!' + end, + } + + function _lazygit_toggle() + lazygit:toggle() + end + + function _normal_toggle() + normalterm:toggle() + end + + vim.api.nvim_set_keymap('n', 'tg', 'lua _lazygit_toggle()', { desc = 'LazyGit', noremap = true, silent = true }) + vim.api.nvim_set_keymap('n', 'tn', 'lua _normal_toggle()', { desc = 'Terminal', noremap = true, silent = true }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/ts.lua b/nvim/.config/nvim/lua/custom/plugins/ts.lua new file mode 100644 index 0000000..3680020 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/ts.lua @@ -0,0 +1,7 @@ +return { + { + 'pmizio/typescript-tools.nvim', + dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, + opts = {}, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/ufo.lua b/nvim/.config/nvim/lua/custom/plugins/ufo.lua new file mode 100644 index 0000000..43584ab --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/ufo.lua @@ -0,0 +1,21 @@ +return { + { + 'kevinhwang91/nvim-ufo', + dependencies = { 'kevinhwang91/promise-async' }, + opts = { + filetype_exclude = { 'help', 'alpha', 'dashboard', 'neo-tree', 'Trouble', 'lazy', 'mason' }, + }, + config = function(_, opts) + vim.api.nvim_create_autocmd('FileType', { + group = vim.api.nvim_create_augroup('local_detach_ufo', { clear = true }), + pattern = opts.filetype_exclude, + callback = function() + require('ufo').detach() + end, + }) + + vim.opt.foldlevelstart = 99 + require('ufo').setup(opts) + end, + }, +} diff --git a/nvim/.config/nvim/lua/custom/plugins/zen.lua b/nvim/.config/nvim/lua/custom/plugins/zen.lua new file mode 100644 index 0000000..8e66d4f --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/zen.lua @@ -0,0 +1,21 @@ +return { + -- Lua + { + 'folke/zen-mode.nvim', + opts = { + window = { + width = 0.90, + }, + plugins = { + alacritty = { + enabled = true, + font = '14', -- font size + }, + }, + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + }, + -- Lua +} diff --git a/nvim/.config/nvim/lua/keymaps.lua b/nvim/.config/nvim/lua/keymaps.lua new file mode 100644 index 0000000..1a362b3 --- /dev/null +++ b/nvim/.config/nvim/lua/keymaps.lua @@ -0,0 +1,36 @@ +vim.keymap.set('n', '', 'nohlsearch') + +vim.keymap.set('n', 'c', function() + MiniBufremove.delete() +end, { desc = 'close buffer' }) +vim.keymap.set('n', 'q', ':q', { desc = 'close buffer' }) + +vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) + +-- TIP: Disable arrow keys in normal mode +-- vim.keymap.set('n', '', 'echo "Use h to move!!"') +-- vim.keymap.set('n', '', 'echo "Use l to move!!"') +-- vim.keymap.set('n', '', 'echo "Use k to move!!"') +-- vim.keymap.set('n', '', 'echo "Use j to move!!"') + +-- Keybinds to make split navigation easier. +-- Use CTRL+ to switch between windows +-- +-- See `:help wincmd` for a list of all window commands +vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) + +vim.keymap.set('n', 'H', ':BufferLineCyclePrev', { desc = 'tab-left' }) +vim.keymap.set('n', 'L', ':BufferLineCycleNext', { desc = 'tab-right' }) + +vim.api.nvim_create_autocmd('TextYankPost', { + desc = 'Highlight when yanking (copying) text', + group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), + callback = function() + vim.highlight.on_yank() + end, +}) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/health.lua b/nvim/.config/nvim/lua/kickstart/health.lua new file mode 100644 index 0000000..b59d086 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/health.lua @@ -0,0 +1,52 @@ +--[[ +-- +-- This file is not required for your own configuration, +-- but helps people determine if their system is setup correctly. +-- +--]] + +local check_version = function() + local verstr = tostring(vim.version()) + if not vim.version.ge then + vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) + return + end + + if vim.version.ge(vim.version(), '0.10-dev') then + vim.health.ok(string.format("Neovim version is: '%s'", verstr)) + else + vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) + end +end + +local check_external_reqs = function() + -- Basic utils: `git`, `make`, `unzip` + for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do + local is_executable = vim.fn.executable(exe) == 1 + if is_executable then + vim.health.ok(string.format("Found executable: '%s'", exe)) + else + vim.health.warn(string.format("Could not find executable: '%s'", exe)) + end + end + + return true +end + +return { + check = function() + vim.health.start 'kickstart.nvim' + + vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth` + + Fix only warnings for plugins and languages you intend to use. + Mason will give warnings for languages that are not installed. + You do not need to install, unless you want to use those languages!]] + + local uv = vim.uv or vim.loop + vim.health.info('System Information: ' .. vim.inspect(uv.os_uname())) + + check_version() + check_external_reqs() + end, +} diff --git a/nvim/.config/nvim/lua/kickstart/plugins/autopairs.lua b/nvim/.config/nvim/lua/kickstart/plugins/autopairs.lua new file mode 100644 index 0000000..8943de8 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/autopairs.lua @@ -0,0 +1,11 @@ +return { + 'windwp/nvim-autopairs', + event = 'InsertEnter', + dependencies = { 'hrsh7th/nvim-cmp' }, + config = function() + require('nvim-autopairs').setup {} + local cmp_autopairs = require 'nvim-autopairs.completion.cmp' + local cmp = require 'cmp' + cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) + end, +} diff --git a/nvim/.config/nvim/lua/kickstart/plugins/cmp.lua b/nvim/.config/nvim/lua/kickstart/plugins/cmp.lua new file mode 100644 index 0000000..36b043d --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/cmp.lua @@ -0,0 +1,66 @@ +return { + { -- Autocompletion + 'hrsh7th/nvim-cmp', + event = 'InsertEnter', + dependencies = { + { + 'L3MON4D3/LuaSnip', + build = (function() + if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then + return + end + return 'make install_jsregexp' + end)(), + dependencies = {}, + }, + 'saadparwaiz1/cmp_luasnip', + 'rafamadriz/friendly-snippets', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-path', + }, + config = function() + -- See `:help cmp` + local cmp = require 'cmp' + local luasnip = require 'luasnip' + luasnip.config.setup {} + require('luasnip.loaders.from_vscode').lazy_load() + cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + completion = { completeopt = 'menu,menuone,noinsert' }, + + mapping = cmp.mapping.preset.insert { + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.complete {}, + [''] = cmp.mapping(function() + if luasnip.expand_or_locally_jumpable() then + luasnip.expand_or_jump() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function() + if luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + end + end, { 'i', 's' }), + }, + sources = { + { + name = 'lazydev', + group_index = 0, + }, + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + { name = 'path' }, + }, + } + end, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/conform.lua b/nvim/.config/nvim/lua/kickstart/plugins/conform.lua new file mode 100644 index 0000000..6c0c631 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/conform.lua @@ -0,0 +1,38 @@ +return { + { -- Autoformat + 'stevearc/conform.nvim', + event = { 'BufWritePre' }, + cmd = { 'ConformInfo' }, + keys = { + { + 'df', + function() + require('conform').format { async = true, lsp_format = 'fallback' } + end, + mode = '', + desc = '[F]ormat buffer', + }, + }, + opts = { + notify_on_error = false, + format_on_save = function(bufnr) + local disable_filetypes = { c = true, cpp = true } + local lsp_format_opt + if disable_filetypes[vim.bo[bufnr].filetype] then + lsp_format_opt = 'never' + else + lsp_format_opt = 'fallback' + end + return { + timeout_ms = 500, + lsp_format = lsp_format_opt, + } + end, + formatters_by_ft = { + lua = { 'stylua' }, + php = { 'mago_format', 'mago_lint' }, + }, + }, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/debug.lua b/nvim/.config/nvim/lua/kickstart/plugins/debug.lua new file mode 100644 index 0000000..7917048 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/debug.lua @@ -0,0 +1,136 @@ +return { + -- NOTE: Yes, you can install new plugins here! + 'mfussenegger/nvim-dap', + -- NOTE: And you can specify dependencies as well + dependencies = { + 'rcarriga/nvim-dap-ui', + 'nvim-neotest/nvim-nio', + 'williamboman/mason.nvim', + 'jay-babu/mason-nvim-dap.nvim', + 'leoluz/nvim-dap-go', + }, + keys = { + { + '', + function() + require('dap').continue() + end, + desc = 'Debug: Start/Continue', + }, + { + '', + function() + require('dap').step_into() + end, + desc = 'Debug: Step Into', + }, + { + '', + function() + require('dap').step_over() + end, + desc = 'Debug: Step Over', + }, + { + '', + function() + require('dap').step_out() + end, + desc = 'Debug: Step Out', + }, + { + 'b', + function() + require('dap').toggle_breakpoint() + end, + desc = 'Debug: Toggle Breakpoint', + }, + { + 'B', + function() + require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') + end, + desc = 'Debug: Set Breakpoint', + }, + { + '', + function() + require('dapui').toggle() + end, + desc = 'Debug: See last session result.', + }, + }, + config = function() + local dap = require 'dap' + local dapui = require 'dapui' + + require('mason-nvim-dap').setup { + automatic_installation = true, + handlers = {}, + ensure_installed = { + 'delve', + }, + } + + dapui.setup { + icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, + layouts = { + { + elements = { + { + id = 'scopes', + size = 0.25, + }, + { + id = 'breakpoints', + size = 0.25, + }, + { + id = 'stacks', + size = 0.25, + }, + { + id = 'watches', + size = 0.25, + }, + }, + position = 'left', + size = 40, + }, + { + elements = { { + id = 'repl', + size = 0.5, + }, { + id = 'console', + size = 0.5, + } }, + position = 'bottom', + size = 10, + }, + }, + controls = { + icons = { + pause = '⏸', + play = '▶', + step_into = '⏎', + step_over = '⏭', + step_out = '⏮', + step_back = 'b', + run_last = '▶▶', + terminate = '⏹', + disconnect = '⏏', + }, + }, + } + + dap.listeners.after.event_initialized['dapui_config'] = dapui.open + dap.listeners.before.event_terminated['dapui_config'] = dapui.close + dap.listeners.before.event_exited['dapui_config'] = dapui.close + require('dap-go').setup { + delve = { + detached = vim.fn.has 'win32' == 0, + }, + } + end, +} diff --git a/nvim/.config/nvim/lua/kickstart/plugins/gitsigns.lua b/nvim/.config/nvim/lua/kickstart/plugins/gitsigns.lua new file mode 100644 index 0000000..5b149d4 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/gitsigns.lua @@ -0,0 +1,65 @@ +return { + { -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + on_attach = function(bufnr) + local gitsigns = require 'gitsigns' + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map('n', ']c', function() + if vim.wo.diff then + vim.cmd.normal { ']c', bang = true } + else + gitsigns.nav_hunk 'next' + end + end, { desc = 'Jump to next git [c]hange' }) + + map('n', '[c', function() + if vim.wo.diff then + vim.cmd.normal { '[c', bang = true } + else + gitsigns.nav_hunk 'prev' + end + end, { desc = 'Jump to previous git [c]hange' }) + + -- Actions + -- visual mode + map('v', 'hs', function() + gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'git [s]tage hunk' }) + map('v', 'hr', function() + gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'git [r]eset hunk' }) + -- normal mode + map('n', 'hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) + map('n', 'hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) + map('n', 'hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) + map('n', 'hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' }) + map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) + map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) + map('n', 'hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) + map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) + map('n', 'hD', function() + gitsigns.diffthis '@' + end, { desc = 'git [D]iff against last commit' }) + -- Toggles + map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) + map('n', 'tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' }) + end, + }, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/indent_line.lua b/nvim/.config/nvim/lua/kickstart/plugins/indent_line.lua new file mode 100644 index 0000000..ed7f269 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/indent_line.lua @@ -0,0 +1,9 @@ +return { + { -- Add indentation guides even on blank lines + 'lukas-reineke/indent-blankline.nvim', + -- Enable `lukas-reineke/indent-blankline.nvim` + -- See `:help ibl` + main = 'ibl', + opts = {}, + }, +} diff --git a/nvim/.config/nvim/lua/kickstart/plugins/lint.lua b/nvim/.config/nvim/lua/kickstart/plugins/lint.lua new file mode 100644 index 0000000..907c6bf --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/lint.lua @@ -0,0 +1,60 @@ +return { + + { -- Linting + 'mfussenegger/nvim-lint', + event = { 'BufReadPre', 'BufNewFile' }, + config = function() + local lint = require 'lint' + lint.linters_by_ft = { + markdown = { 'markdownlint' }, + } + + -- To allow other plugins to add linters to require('lint').linters_by_ft, + -- instead set linters_by_ft like this: + -- lint.linters_by_ft = lint.linters_by_ft or {} + -- lint.linters_by_ft['markdown'] = { 'markdownlint' } + -- + -- However, note that this will enable a set of default linters, + -- which will cause errors unless these tools are available: + -- { + -- clojure = { "clj-kondo" }, + -- dockerfile = { "hadolint" }, + -- inko = { "inko" }, + -- janet = { "janet" }, + -- json = { "jsonlint" }, + -- markdown = { "vale" }, + -- rst = { "vale" }, + -- ruby = { "ruby" }, + -- terraform = { "tflint" }, + -- text = { "vale" } + -- } + -- + -- You can disable the default linters by setting their filetypes to nil: + -- lint.linters_by_ft['clojure'] = nil + -- lint.linters_by_ft['dockerfile'] = nil + -- lint.linters_by_ft['inko'] = nil + -- lint.linters_by_ft['janet'] = nil + -- lint.linters_by_ft['json'] = nil + -- lint.linters_by_ft['markdown'] = nil + -- lint.linters_by_ft['rst'] = nil + -- lint.linters_by_ft['ruby'] = nil + -- lint.linters_by_ft['terraform'] = nil + -- lint.linters_by_ft['text'] = nil + + -- Create autocommand which carries out the actual linting + -- on the specified events. + local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) + vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { + group = lint_augroup, + callback = function() + -- Only run the linter in buffers that you can modify in order to + -- avoid superfluous noise, notably within the handy LSP pop-ups that + -- describe the hovered symbol using Markdown. + if vim.opt_local.modifiable:get() then + lint.try_lint() + end + end, + }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/kickstart/plugins/lspconfig.lua b/nvim/.config/nvim/lua/kickstart/plugins/lspconfig.lua new file mode 100644 index 0000000..92ec4cc --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/lspconfig.lua @@ -0,0 +1,240 @@ +-- LSP Plugins +return { + { + -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins + -- used for completion, annotations and signatures of Neovim apis + 'folke/lazydev.nvim', + ft = 'lua', + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = 'luvit-meta/library', words = { 'vim%.uv' } }, + }, + }, + }, + { 'Bilal2453/luvit-meta', lazy = true }, + { + -- Main LSP Configuration + 'neovim/nvim-lspconfig', + dependencies = { + -- Automatically install LSPs and related tools to stdpath for Neovim + { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants + 'williamboman/mason-lspconfig.nvim', + 'WhoIsSethDaniel/mason-tool-installer.nvim', + + -- Useful status updates for LSP. + -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` + { 'j-hui/fidget.nvim', opts = {} }, + + -- Allows extra capabilities provided by nvim-cmp + 'hrsh7th/cmp-nvim-lsp', + }, + config = function() + -- Brief aside: **What is LSP?** + -- + -- LSP is an initialism you've probably heard, but might not understand what it is. + -- + -- LSP stands for Language Server Protocol. It's a protocol that helps editors + -- and language tooling communicate in a standardized fashion. + -- + -- In general, you have a "server" which is some tool built to understand a particular + -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers + -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone + -- processes that communicate with some "client" - in this case, Neovim! + -- + -- LSP provides Neovim with features like: + -- - Go to definition + -- - Find references + -- - Autocompletion + -- - Symbol Search + -- - and more! + -- + -- Thus, Language Servers are external tools that must be installed separately from + -- Neovim. This is where `mason` and related plugins come into play. + -- + -- If you're wondering about lsp vs treesitter, you can check out the wonderfully + -- and elegantly composed help section, `:help lsp-vs-treesitter` + + -- This function gets run when an LSP attaches to a particular buffer. + -- That is to say, every time a new file is opened that is associated with + -- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this + -- function will be executed to configure the current buffer + vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), + callback = function(event) + -- NOTE: Remember that Lua is a real programming language, and as such it is possible + -- to define small helper and utility functions so you don't have to repeat yourself. + -- + -- In this case, we create a function that lets us more easily define mappings specific + -- for LSP related items. It sets the mode, buffer and description for us each time. + local map = function(keys, func, desc, mode) + mode = mode or 'n' + vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) + end + + -- Jump to the definition of the word under your cursor. + -- This is where a variable was first declared, or where a function is defined, etc. + -- To jump back, press . + map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + + -- Find references for the word under your cursor. + map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + + -- Jump to the implementation of the word under your cursor. + -- Useful when your language has ways of declaring types without an actual implementation. + map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + + -- Jump to the type of the word under your cursor. + -- Useful when you're not sure what type a variable is and you want to see + -- the definition of its *type*, not where it was *defined*. + map('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') + + -- Fuzzy find all the symbols in your current document. + -- Symbols are things like variables, functions, types, etc. + map('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') + + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. + map('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') + + -- Rename the variable under your cursor. + -- Most Language Servers support renaming across files, etc. + map('rn', vim.lsp.buf.rename, '[R]e[n]ame') + + -- Execute a code action, usually your cursor needs to be on top of an error + -- or a suggestion from your LSP for this to activate. + map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) + + -- WARN: This is not Goto Definition, this is Goto Declaration. + -- For example, in C this would take you to the header. + map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + + -- The following two autocommands are used to highlight references of the + -- word under your cursor when your cursor rests there for a little while. + -- See `:help CursorHold` for information about when this is executed + -- + -- When you move your cursor, the highlights will be cleared (the second autocommand). + local client = vim.lsp.get_client_by_id(event.data.client_id) + if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then + local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) + vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { + buffer = event.buf, + group = highlight_augroup, + callback = vim.lsp.buf.document_highlight, + }) + + vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, { + buffer = event.buf, + group = highlight_augroup, + callback = vim.lsp.buf.clear_references, + }) + + vim.api.nvim_create_autocmd('LspDetach', { + group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), + callback = function(event2) + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf } + end, + }) + end + + -- The following code creates a keymap to toggle inlay hints in your + -- code, if the language server you are using supports them + -- + -- This may be unwanted, since they displace some of your code + if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then + map('th', function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) + end, '[T]oggle Inlay [H]ints') + end + end, + }) + + -- Change diagnostic symbols in the sign column (gutter) + -- if vim.g.have_nerd_font then + -- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' } + -- local diagnostic_signs = {} + -- for type, icon in pairs(signs) do + -- diagnostic_signs[vim.diagnostic.severity[type]] = icon + -- end + -- vim.diagnostic.config { signs = { text = diagnostic_signs } } + -- end + + -- LSP servers and clients are able to communicate to each other what features they support. + -- By default, Neovim doesn't support everything that is in the LSP specification. + -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. + -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities()) + + -- Enable the following language servers + -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. + -- + -- Add any additional override configuration in the following tables. Available keys are: + -- - cmd (table): Override the default command used to start the server + -- - filetypes (table): Override the default list of associated filetypes for the server + -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. + -- - settings (table): Override the default settings passed when initializing the server. + -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ + local servers = { + -- clangd = {}, + -- gopls = {}, + -- pyright = {}, + -- rust_analyzer = {}, + -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs + -- + -- Some languages (like typescript) have entire language plugins that can be useful: + -- https://github.com/pmizio/typescript-tools.nvim + -- + -- But for many setups, the LSP (`ts_ls`) will work just fine + -- ts_ls = {}, + -- + + lua_ls = { + -- cmd = { ... }, + -- filetypes = { ... }, + -- capabilities = {}, + settings = { + Lua = { + completion = { + callSnippet = 'Replace', + }, + -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings + -- diagnostics = { disable = { 'missing-fields' } }, + }, + }, + }, + } + + -- Ensure the servers and tools above are installed + -- To check the current status of installed tools and/or manually install + -- other tools, you can run + -- :Mason + -- + -- You can press `g?` for help in this menu. + require('mason').setup() + + -- You can add other tools here that you want Mason to install + -- for you, so that they are available from within Neovim. + local ensure_installed = vim.tbl_keys(servers or {}) + vim.list_extend(ensure_installed, { + 'stylua', -- Used to format Lua code + }) + require('mason-tool-installer').setup { ensure_installed = ensure_installed } + + require('mason-lspconfig').setup { + handlers = { + function(server_name) + local server = servers[server_name] or {} + -- This handles overriding only values explicitly passed + -- by the server configuration above. Useful when disabling + -- certain features of an LSP (for example, turning off formatting for ts_ls) + server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) + require('lspconfig')[server_name].setup(server) + end, + }, + } + end, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/mini.lua b/nvim/.config/nvim/lua/kickstart/plugins/mini.lua new file mode 100644 index 0000000..e7f68ff --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/mini.lua @@ -0,0 +1,41 @@ +return { + { -- Collection of various small independent plugins/modules + 'echasnovski/mini.nvim', + config = function() + -- Better Around/Inside textobjects + -- + -- Examples: + -- - va) - [V]isually select [A]round [)]paren + -- - yinq - [Y]ank [I]nside [N]ext [Q]uote + -- - ci' - [C]hange [I]nside [']quote + require('mini.ai').setup { n_lines = 500 } + require('mini.bufremove').setup() + + -- Add/delete/replace surroundings (brackets, quotes, etc.) + -- + -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren + -- - sd' - [S]urround [D]elete [']quotes + -- - sr)' - [S]urround [R]eplace [)] ['] + require('mini.surround').setup() + + -- Simple and easy statusline. + -- You could remove this setup call if you don't like it, + -- and try some other statusline plugin + local statusline = require 'mini.statusline' + -- set use_icons to true if you have a Nerd Font + statusline.setup { use_icons = vim.g.have_nerd_font } + + -- You can configure sections in the statusline by overriding their + -- default behavior. For example, here we set the section for + -- cursor location to LINE:COLUMN + ---@diagnostic disable-next-line: duplicate-set-field + statusline.section_location = function() + return '%2l:%-2v' + end + + -- ... and there is more! + -- Check out: https://github.com/echasnovski/mini.nvim + end, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua b/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua new file mode 100644 index 0000000..6690594 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/neo-tree.lua @@ -0,0 +1,27 @@ +-- Neo-tree is a Neovim plugin to browse the file system +-- https://github.com/nvim-neo-tree/neo-tree.nvim + +return { + 'nvim-neo-tree/neo-tree.nvim', + version = '*', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + }, + cmd = 'Neotree', + keys = { + { 'e', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, + { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, + }, + opts = { + filesystem = { + window = { + mappings = { + ['e'] = 'close_window', + ['\\'] = 'close_window', + }, + }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/kickstart/plugins/telescope.lua b/nvim/.config/nvim/lua/kickstart/plugins/telescope.lua new file mode 100644 index 0000000..44e8976 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/telescope.lua @@ -0,0 +1,109 @@ +-- NOTE: Plugins can specify dependencies. +-- +-- The dependencies are proper plugin specifications as well - anything +-- you do for a plugin at the top level, you can do for a dependency. +-- +-- Use the `dependencies` key to specify the dependencies of a particular plugin + +return { + { -- Fuzzy Finder (files, lsp, etc) + 'nvim-telescope/telescope.nvim', + event = 'VimEnter', + branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim', + { -- If encountering errors, see telescope-fzf-native README for installation instructions + 'nvim-telescope/telescope-fzf-native.nvim', + + -- `build` is used to run some command when the plugin is installed/updated. + -- This is only run then, not every time Neovim starts up. + build = 'make', + + -- `cond` is a condition used to determine whether this plugin should be + -- installed and loaded. + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, + { 'nvim-telescope/telescope-ui-select.nvim' }, + + -- Useful for getting pretty icons, but requires a Nerd Font. + { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + }, + config = function() + -- Telescope is a fuzzy finder that comes with a lot of different things that + -- it can fuzzy find! It's more than just a "file finder", it can search + -- many different aspects of Neovim, your workspace, LSP, and more! + -- + -- The easiest way to use Telescope, is to start by doing something like: + -- :Telescope help_tags + -- + -- After running this command, a window will open up and you're able to + -- type in the prompt window. You'll see a list of `help_tags` options and + -- a corresponding preview of the help. + -- + -- Two important keymaps to use while in Telescope are: + -- - Insert mode: + -- - Normal mode: ? + -- + -- This opens a window that shows you all of the keymaps for the current + -- Telescope picker. This is really useful to discover what Telescope can + -- do as well as how to actually do it! + + -- [[ Configure Telescope ]] + -- See `:help telescope` and `:help telescope.setup()` + require('telescope').setup { + -- You can put your default mappings / updates / etc. in here + -- All the info you're looking for is in `:help telescope.setup()` + -- + -- defaults = { + -- mappings = { + -- i = { [''] = 'to_fuzzy_refine' }, + -- }, + -- }, + -- pickers = {} + extensions = { + ['ui-select'] = { + require('telescope.themes').get_dropdown(), + }, + }, + } + + -- Enable Telescope extensions if they are installed + pcall(require('telescope').load_extension, 'fzf') + pcall(require('telescope').load_extension, 'ui-select') + + -- See `:help telescope.builtin` + local builtin = require 'telescope.builtin' + vim.keymap.set('n', 'fh', builtin.help_tags, { desc = '[F]ind [H]elp' }) + vim.keymap.set('n', 'fk', builtin.keymaps, { desc = '[F]ind [K]eymaps' }) + vim.keymap.set('n', 'ff', builtin.find_files, { desc = '[F]ind [F]iles' }) + vim.keymap.set('n', 'fs', builtin.builtin, { desc = '[F]ind [S]elect Telescope' }) + vim.keymap.set('n', 'fw', builtin.grep_string, { desc = '[F]ind current [W]ord' }) + vim.keymap.set('n', 'fg', builtin.live_grep, { desc = '[F]ind by [G]rep' }) + vim.keymap.set('n', 'fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostics' }) + vim.keymap.set('n', 'fr', builtin.resume, { desc = '[F]ind [R]esume' }) + vim.keymap.set('n', 'f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' }) + vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + + vim.keymap.set('n', '/', function() + builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { + winblend = 10, + previewer = false, + }) + end, { desc = '[/] Fuzzily search in current buffer' }) + + vim.keymap.set('n', 'f/', function() + builtin.live_grep { + grep_open_files = true, + prompt_title = 'Live Grep in Open Files', + } + end, { desc = '[F]ind [/] in Open Files' }) + + vim.keymap.set('n', 'fn', function() + builtin.find_files { cwd = vim.fn.stdpath 'config' } + end, { desc = '[f]ind [N]eovim files' }) + end, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/todo-comments.lua b/nvim/.config/nvim/lua/kickstart/plugins/todo-comments.lua new file mode 100644 index 0000000..407e821 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/todo-comments.lua @@ -0,0 +1,5 @@ +-- Highlight todo, notes, etc in comments +return { + { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/tokyonight.lua b/nvim/.config/nvim/lua/kickstart/plugins/tokyonight.lua new file mode 100644 index 0000000..5a363b8 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/tokyonight.lua @@ -0,0 +1,11 @@ +return { + { -- You can easily change to a different colorscheme. + 'folke/tokyonight.nvim', + priority = 1000, -- Make sure to load this before all the other start plugins. + init = function() + vim.cmd.colorscheme 'tokyonight' + vim.cmd.hi 'Comment gui=none' + end, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/treesitter.lua b/nvim/.config/nvim/lua/kickstart/plugins/treesitter.lua new file mode 100644 index 0000000..b7dba83 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/treesitter.lua @@ -0,0 +1,17 @@ +return { + { -- Highlight, edit, and navigate code + 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate', + main = 'nvim-treesitter.configs', -- Sets main module to use for opts + opts = { + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = { 'ruby' }, + }, + indent = { enable = true, disable = { 'ruby' } }, + }, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/kickstart/plugins/which-key.lua b/nvim/.config/nvim/lua/kickstart/plugins/which-key.lua new file mode 100644 index 0000000..1d56e25 --- /dev/null +++ b/nvim/.config/nvim/lua/kickstart/plugins/which-key.lua @@ -0,0 +1,73 @@ +-- NOTE: Plugins can also be configured to run Lua code when they are loaded. +-- +-- This is often very useful to both group configuration, as well as handle +-- lazy loading plugins that don't need to be loaded immediately at startup. +-- +-- For example, in the following configuration, we use: +-- event = 'VimEnter' +-- +-- which loads which-key before all the UI elements are loaded. Events can be +-- normal autocommands events (`:help autocmd-events`). +-- +-- Then, because we use the `opts` key (recommended), the configuration runs +-- after the plugin has been loaded as `require(MODULE).setup(opts)`. + +return { + { -- Useful plugin to show you pending keybinds. + 'folke/which-key.nvim', + event = 'VimEnter', -- Sets the loading event to 'VimEnter' + opts = { + -- delay between pressing a key and opening which-key (milliseconds) + -- this setting is independent of vim.opt.timeoutlen + delay = 0, + icons = { + -- set icon mappings to true if you have a Nerd Font + mappings = vim.g.have_nerd_font, + -- If you are using a Nerd Font: set icons.keys to an empty table which will use the + -- default which-key.nvim defined Nerd Font icons, otherwise define a string table + keys = vim.g.have_nerd_font and {} or { + Up = ' ', + Down = ' ', + Left = ' ', + Right = ' ', + C = ' ', + M = ' ', + D = ' ', + S = ' ', + CR = ' ', + Esc = ' ', + ScrollWheelDown = ' ', + ScrollWheelUp = ' ', + NL = ' ', + BS = ' ', + Space = ' ', + Tab = ' ', + F1 = '', + F2 = '', + F3 = '', + F4 = '', + F5 = '', + F6 = '', + F7 = '', + F8 = '', + F9 = '', + F10 = '', + F11 = '', + F12 = '', + }, + }, + + -- Document existing key chains + spec = { + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'd', group = '[D]ocument' }, + { 'r', group = '[R]ename' }, + { 'f', group = '[F]ind' }, + { 'w', group = '[W]orkspace' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + }, + }, + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/lazy-bootstrap.lua b/nvim/.config/nvim/lua/lazy-bootstrap.lua new file mode 100644 index 0000000..8dc96c8 --- /dev/null +++ b/nvim/.config/nvim/lua/lazy-bootstrap.lua @@ -0,0 +1,13 @@ +-- [[ Install `lazy.nvim` plugin manager ]] +-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info +local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = 'https://github.com/folke/lazy.nvim.git' + local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath } + if vim.v.shell_error ~= 0 then + error('Error cloning lazy.nvim:\n' .. out) + end +end ---@diagnostic disable-next-line: undefined-field +vim.opt.rtp:prepend(lazypath) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/lazy-plugins.lua b/nvim/.config/nvim/lua/lazy-plugins.lua new file mode 100644 index 0000000..5902e48 --- /dev/null +++ b/nvim/.config/nvim/lua/lazy-plugins.lua @@ -0,0 +1,54 @@ +require('lazy').setup({ + 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically + + require 'kickstart/plugins/gitsigns', + + require 'kickstart/plugins/which-key', + + require 'kickstart/plugins/telescope', + + require 'kickstart/plugins/lspconfig', + + require 'kickstart/plugins/conform', + + require 'kickstart/plugins/cmp', + + require 'kickstart/plugins/tokyonight', + + require 'kickstart/plugins/todo-comments', + + require 'kickstart/plugins/mini', + + require 'kickstart/plugins/treesitter', + + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.lint', + require 'kickstart.plugins.gitsigns', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + + { import = 'custom.plugins' }, +}, { + ui = { + -- If you are using a Nerd Font: set icons to an empty table which will use the + -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table + icons = vim.g.have_nerd_font and {} or { + cmd = '⌘', + config = '🛠', + event = '📅', + ft = '📂', + init = '⚙', + keys = '🗝', + plugin = '🔌', + runtime = '💻', + require = '🌙', + source = '📄', + start = '🚀', + task = '📌', + lazy = '💤 ', + }, + }, +}) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/.config/nvim/lua/options.lua b/nvim/.config/nvim/lua/options.lua new file mode 100644 index 0000000..7047d2d --- /dev/null +++ b/nvim/.config/nvim/lua/options.lua @@ -0,0 +1,51 @@ +vim.opt.number = true +-- vim.opt.relativenumber = true + +vim.opt.mouse = 'a' + +vim.opt.showmode = false + +vim.opt.clipboard = 'unnamedplus' + +vim.g.clipboard = { + name = 'wl-clipboard', + copy = { + ['+'] = 'wl-copy --foreground --type text/plain', + ['*'] = 'wl-copy --foreground --type text/plain', + }, + paste = { + ['+'] = 'wl-paste --no-newline', + ['*'] = 'wl-paste --no-newline', + }, + cache_enabled = 1, +} + +vim.opt.breakindent = true + +vim.opt.termguicolors = true + +vim.opt.undofile = true + +vim.opt.ignorecase = true + +vim.opt.smartcase = true + +vim.opt.signcolumn = 'yes' + +vim.opt.updatetime = 250 + +vim.opt.timeoutlen = 300 + +vim.opt.splitright = true +vim.opt.splitbelow = true + +vim.opt.list = true +vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } + +vim.opt.inccommand = 'split' + +vim.opt.cursorline = true + +vim.opt.scrolloff = 10 + +-- vim: ts=2 sts=2 sw=2 et