From 2b847a7cf3cbef35fc59a33202fcbf2d6773c268 Mon Sep 17 00:00:00 2001 From: Wynd Date: Fri, 24 May 2024 16:07:28 +0300 Subject: [PATCH] Initial commit --- .config/alacritty/alacritty.toml | 26 ++ .config/alacritty/catppuccin-macchiato.toml | 75 ++++++ .config/btop/btop.conf | 203 ++++++++++++++++ .config/mpv/input.conf | 9 + .config/mpv/mpv.conf | 4 + .config/nvim/README.md | 35 +++ .config/nvim/after/ftplugin/markdown.lua | 8 + .config/nvim/init.lua | 16 ++ .config/nvim/lazy-lock.json | 34 +++ .config/nvim/lua/nvwynd/autocmds.lua | 15 ++ .config/nvim/lua/nvwynd/init.lua | 11 + .config/nvim/lua/nvwynd/keymaps.lua | 67 ++++++ .config/nvim/lua/nvwynd/options.lua | 61 +++++ .../nvim/lua/nvwynd/plugins/colorscheme.lua | 11 + .../nvim/lua/nvwynd/plugins/completion.lua | 64 +++++ .config/nvim/lua/nvwynd/plugins/editor.lua | 45 ++++ .../nvim/lua/nvwynd/plugins/formatting.lua | 38 +++ .config/nvim/lua/nvwynd/plugins/lsp.lua | 131 ++++++++++ .../nvim/lua/nvwynd/plugins/treesitter.lua | 49 ++++ .config/nvim/lua/nvwynd/plugins/ui.lua | 11 + .config/nvim/lua/nvwynd/plugins/util.lua | 25 ++ .config/nvim/lua/nvwynd/plugins/zen.lua | 11 + .config/nvim/spell/en.utf-8.add | 15 ++ .config/nvim/spell/en.utf-8.add.spl | Bin 0 -> 193 bytes .config/starship.toml | 227 ++++++++++++++++++ .config/tmux/tmux.conf | 55 +++++ .gitconfig | 34 +++ .zshrc | 113 +++++++++ README.md | 13 + dot.py | 62 +++++ dot.toml | 26 ++ 31 files changed, 1494 insertions(+) create mode 100644 .config/alacritty/alacritty.toml create mode 100644 .config/alacritty/catppuccin-macchiato.toml create mode 100644 .config/btop/btop.conf create mode 100644 .config/mpv/input.conf create mode 100644 .config/mpv/mpv.conf create mode 100644 .config/nvim/README.md create mode 100644 .config/nvim/after/ftplugin/markdown.lua create mode 100644 .config/nvim/init.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/nvwynd/autocmds.lua create mode 100644 .config/nvim/lua/nvwynd/init.lua create mode 100644 .config/nvim/lua/nvwynd/keymaps.lua create mode 100644 .config/nvim/lua/nvwynd/options.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/colorscheme.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/completion.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/editor.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/formatting.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/lsp.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/treesitter.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/ui.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/util.lua create mode 100644 .config/nvim/lua/nvwynd/plugins/zen.lua create mode 100644 .config/nvim/spell/en.utf-8.add create mode 100644 .config/nvim/spell/en.utf-8.add.spl create mode 100644 .config/starship.toml create mode 100644 .config/tmux/tmux.conf create mode 100644 .gitconfig create mode 100644 .zshrc create mode 100644 README.md create mode 100755 dot.py create mode 100644 dot.toml diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..223cabd --- /dev/null +++ b/.config/alacritty/alacritty.toml @@ -0,0 +1,26 @@ +import = [ + "~/.config/alacritty/catppuccin-macchiato.toml" +] + +[env] +TERM = "xterm-256color" +XCURSOR_THEME = "Bibata-Modern-Classic" + +[window] +decorations="None" +opacity = 1.0 +blur = true + +[font] +# normal = { family = "FiraCode Nerd Font", style = "Bold" } +normal = { family = "JetBrainsMonoNerdFont", style = "Regular" } +size = 12 + +[cursor] +style = { shape = "Block", blinking = "Always" } + +[keyboard] +bindings = [ + # This fixed a weird issue inside tmux with nvim where Ctrl + / wouldn't work + { key = "Slash", mods = "Control", chars = "\u001f" }, +] diff --git a/.config/alacritty/catppuccin-macchiato.toml b/.config/alacritty/catppuccin-macchiato.toml new file mode 100644 index 0000000..05cc701 --- /dev/null +++ b/.config/alacritty/catppuccin-macchiato.toml @@ -0,0 +1,75 @@ +[colors.primary] +background = "#24273a" +foreground = "#cad3f5" +dim_foreground = "#8087a2" +bright_foreground = "#cad3f5" + +[colors.cursor] +text = "#24273a" +cursor = "#f4dbd6" + +[colors.vi_mode_cursor] +text = "#24273a" +cursor = "#b7bdf8" + +[colors.search.matches] +foreground = "#24273a" +background = "#a5adcb" + +[colors.search.focused_match] +foreground = "#24273a" +background = "#a6da95" + +[colors.footer_bar] +foreground = "#24273a" +background = "#a5adcb" + +[colors.hints.start] +foreground = "#24273a" +background = "#eed49f" + +[colors.hints.end] +foreground = "#24273a" +background = "#a5adcb" + +[colors.selection] +text = "#24273a" +background = "#f4dbd6" + +[colors.normal] +black = "#494d64" +red = "#ed8796" +green = "#a6da95" +yellow = "#eed49f" +blue = "#8aadf4" +magenta = "#f5bde6" +cyan = "#8bd5ca" +white = "#b8c0e0" + +[colors.bright] +black = "#5b6078" +red = "#ed8796" +green = "#a6da95" +yellow = "#eed49f" +blue = "#8aadf4" +magenta = "#f5bde6" +cyan = "#8bd5ca" +white = "#a5adcb" + +[colors.dim] +black = "#494d64" +red = "#ed8796" +green = "#a6da95" +yellow = "#eed49f" +blue = "#8aadf4" +magenta = "#f5bde6" +cyan = "#8bd5ca" +white = "#b8c0e0" + +[[colors.indexed_colors]] +index = 16 +color = "#f5a97f" + +[[colors.indexed_colors]] +index = 17 +color = "#f4dbd6" diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf new file mode 100644 index 0000000..f7b4470 --- /dev/null +++ b/.config/btop/btop.conf @@ -0,0 +1,203 @@ +#? Config file for btop v. 1.2.7 + +#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. +#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" +color_theme = "Default" + +#* If the theme set background should be shown, set to False if you want terminal background transparency. +theme_background = False + +#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. +truecolor = True + +#* Set to true to force tty mode regardless if a real tty has been detected or not. +#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. +force_tty = False + +#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. +#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. +#* Use withespace " " as separator between different presets. +#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" +presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default net:0:default" + +#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. +#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. +vim_keys = False + +#* Rounded corners on boxes, is ignored if TTY mode is ON. +rounded_corners = True + +#* Default symbols to use for graph creation, "braille", "block" or "tty". +#* "braille" offers the highest resolution but might not be included in all fonts. +#* "block" has half the resolution of braille but uses more common characters. +#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY. +#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view. +graph_symbol = "braille" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_cpu = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_mem = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_net = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_proc = "default" + +#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace. +shown_boxes = "mem net proc cpu" + +#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. +update_ms = 1000 + +#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", +#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. +proc_sorting = "memory" + +#* Reverse sorting order, True or False. +proc_reversed = False + +#* Show processes as a tree. +proc_tree = False + +#* Use the cpu graph colors in the process list. +proc_colors = True + +#* Use a darkening gradient in the process list. +proc_gradient = True + +#* If process cpu usage should be of the core it's running on or usage of the total available cpu power. +proc_per_core = False + +#* Show process memory as bytes instead of percent. +proc_mem_bytes = True + +#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) +proc_info_smaps = False + +#* Show proc box on left side of screen instead of right. +proc_left = False + +#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_upper = "total" + +#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_lower = "total" + +#* Toggles if the lower CPU graph should be inverted. +cpu_invert_lower = True + +#* Set to True to completely disable the lower CPU graph. +cpu_single_graph = False + +#* Show cpu box at bottom of screen instead of top. +cpu_bottom = False + +#* Shows the system uptime in the CPU box. +show_uptime = True + +#* Show cpu temperature. +check_temp = True + +#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. +cpu_sensor = "Auto" + +#* Show temperatures for cpu cores also if check_temp is True and sensors has been found. +show_coretemp = True + +#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. +#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. +#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries. +#* Example: "4:0 5:1 6:3" +cpu_core_map = "" + +#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine". +temp_scale = "celsius" + +#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. +base_10_sizes = True + +#* Show CPU frequency. +show_cpu_freq = True + +#* Draw a clock at top of screen, formatting according to strftime, empty string to disable. +#* Special formatting: /host = hostname | /user = username | /uptime = system uptime +clock_format = "%X" + +#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. +background_update = True + +#* Custom cpu model name, empty string to disable. +custom_cpu_name = "" + +#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ". +#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user". +disks_filter = "" + +#* Show graphs instead of meters for memory values. +mem_graphs = False + +#* Show mem box below net box instead of above. +mem_below_net = False + +#* Count ZFS ARC in cached and available memory. +zfs_arc_cached = True + +#* If swap memory should be shown in memory box. +show_swap = True + +#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. +swap_disk = True + +#* If mem box should be split to also show disks info. +show_disks = True + +#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. +only_physical = True + +#* Read disks list from /etc/fstab. This also disables only_physical. +use_fstab = True + +#* Set to true to show available disk space for privileged users. +disk_free_priv = False + +#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. +show_io_stat = True + +#* Toggles io mode for disks, showing big graphs for disk read/write speeds. +io_mode = False + +#* Set to True to show combined read/write io graphs in io mode. +io_graph_combined = False + +#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". +#* Example: "/mnt/media:100 /:20 /boot:1". +io_graph_speeds = "" + +#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False. +net_download = 100 + +net_upload = 100 + +#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. +net_auto = False + +#* Sync the auto scaling for download and upload to whichever currently has the highest scale. +net_sync = False + +#* Starts with the Network Interface specified here. +net_iface = "" + +#* Show battery stats in top right if battery is present. +show_battery = True + +#* Which battery to use if multiple are present. "Auto" for auto detection. +selected_battery = "Auto" + +#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. +log_level = "WARNING" \ No newline at end of file diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf new file mode 100644 index 0000000..dcce408 --- /dev/null +++ b/.config/mpv/input.conf @@ -0,0 +1,9 @@ +MBTN_RIGHT cycle pause +MBTN_LEFT ignore + +AXIS_UP add volume 2 +AXIS_DOWN add volume -2 +UP add volume 2 +DOWN add volume -2 + +l show-text "${playlist}" \ No newline at end of file diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf new file mode 100644 index 0000000..3298846 --- /dev/null +++ b/.config/mpv/mpv.conf @@ -0,0 +1,4 @@ +no-keepaspect-window +script-opts=ytdl_hook-ytdl_path=/usr/local/bin/yt-dlp +ytdl-format=bestvideo+bestaudio/best +input-ipc-server=/tmp/mpvsocket diff --git a/.config/nvim/README.md b/.config/nvim/README.md new file mode 100644 index 0000000..9568b69 --- /dev/null +++ b/.config/nvim/README.md @@ -0,0 +1,35 @@ +# neovim config + +## plugins used + +- [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip.git) +- [fidget.nvim](https://github.com/j-hui/fidget.nvim.git) +- [catppuccin](https://github.com/catppuccin/nvim.git) +- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) +- [lspkind.nvim](https://github.com/onsails/lspkind.nvim.git) +- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git) +- [dressing.nvim](https://github.com/stevearc/dressing.nvim.git) +- [lsp-zero.nvim](https://github.com/VonHeikemen/lsp-zero.nvim.git) +- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim.git) +- [which-key.nvim](https://github.com/folke/which-key.nvim.git) +- [lazy.nvim](https://github.com/folke/lazy.nvim.git) +- [zen-mode.nvim](https://github.com/folke/zen-mode.nvim.git) +- [neodev.nvim](https://github.com/folke/neodev.nvim.git) +- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) +- [Comment.nvim](https://github.com/numToStr/Comment.nvim.git) +- [cmp-path](https://github.com/hrsh7th/cmp-path.git) +- [twilight.nvim](https://github.com/folke/twilight.nvim.git) +- [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag.git) +- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons.git) +- [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) +- [cmp-buffer](https://github.com/hrsh7th/cmp-buffer.git) +- [nvim-autopairs](https://github.com/windwp/nvim-autopairs.git) +- [nvim-notify](https://github.com/rcarriga/nvim-notify.git) +- [trouble.nvim](https://github.com/folke/trouble.nvim.git) +- [nui.nvim](https://github.com/MunifTanjim/nui.nvim.git) +- [conform.nvim](https://github.com/stevearc/conform.nvim.git) +- [LuaSnip](https://github.com/L3MON4D3/LuaSnip.git) +- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig.git) +- [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp.git) +- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp.git) +- [image.nvim](https://github.com/3rd/image.nvim.git) diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua new file mode 100644 index 0000000..d02a662 --- /dev/null +++ b/.config/nvim/after/ftplugin/markdown.lua @@ -0,0 +1,8 @@ +-- get only the currently used buffer in the current window and set the options for it +local winid = vim.api.nvim_get_current_win() +local wo = vim.wo[winid][0] + +wo.spell = true +wo.wrap = true + +vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" }) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..e30ea98 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,16 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end + +vim.opt.rtp:prepend(lazypath) + +require("nvwynd") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..3ff0a0e --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,34 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "LuaSnip": { "branch": "master", "commit": "8f3d3465ba5c7ade0a8adb41eca5736f291a3fa8" }, + "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "4660e534bf7678ee0f85879aa75fdcb6855612c2" }, + "dressing.nvim": { "branch": "master", "commit": "5162edb1442a729a885c45455a07e9a89058be2f" }, + "fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" }, + "image.nvim": { "branch": "master", "commit": "cdf1be9c708e75be936cc42d8122b748a51482e4" }, + "lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" }, + "lsp-zero.nvim": { "branch": "v3.x", "commit": "b93f040edd57888cd6a1e7d9dee47dddc4463f8f" }, + "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, + "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, + "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, + "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, + "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, + "nvim-lspconfig": { "branch": "master", "commit": "7133e85c3df14a387da8942c094c7edddcdef309" }, + "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, + "nvim-treesitter": { "branch": "master", "commit": "0883ff05655117a3fc79ab295a640c4984cfd415" }, + "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, + "nvim-web-devicons": { "branch": "master", "commit": "beb6367ab8496c9e43f22e0252735fdadae1872d" }, + "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, + "telescope.nvim": { "branch": "master", "commit": "35f94f0ef32d70e3664a703cefbe71bd1456d899" }, + "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, + "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, + "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" }, + "urlview.nvim": { "branch": "main", "commit": "9206224f6cfe62b35d5ae5610e225c6d0a6436d3" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, + "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" } +} \ No newline at end of file diff --git a/.config/nvim/lua/nvwynd/autocmds.lua b/.config/nvim/lua/nvwynd/autocmds.lua new file mode 100644 index 0000000..c60f2a1 --- /dev/null +++ b/.config/nvim/lua/nvwynd/autocmds.lua @@ -0,0 +1,15 @@ +vim.api.nvim_create_user_command("ListPlugins", function() + local plugins = require("lazy").plugins() + + local f, err = io.open("plugins", "w+") + if f then + for _, v in ipairs(plugins) do + local plugin = string.format("[%s](%s)\n", v.name, v.url) + f:write(plugin) + end + + f:close() + else + print("Error opening file: " .. err) + end +end, {}) diff --git a/.config/nvim/lua/nvwynd/init.lua b/.config/nvim/lua/nvwynd/init.lua new file mode 100644 index 0000000..4f0e50e --- /dev/null +++ b/.config/nvim/lua/nvwynd/init.lua @@ -0,0 +1,11 @@ +require("nvwynd.autocmds") +require("nvwynd.options") + +require("lazy").setup({ + { + -- imports plugins from the /plugins folder, file names don't matter only whats inside them + import = "nvwynd.plugins", + }, +}) + +require("nvwynd.keymaps") diff --git a/.config/nvim/lua/nvwynd/keymaps.lua b/.config/nvim/lua/nvwynd/keymaps.lua new file mode 100644 index 0000000..6145c10 --- /dev/null +++ b/.config/nvim/lua/nvwynd/keymaps.lua @@ -0,0 +1,67 @@ +local map = vim.keymap.set + +-- generic +map("n", "", "w", { desc = "File Save" }) +map("i", "", "w", { desc = "File Save" }) +map("n", "", "bd!", { desc = "Close Buffer" }) +map("v", "J", ":m '>+1gv=gv") +map("v", "K", ":m '<-2gv=gv") + +-- terminal +map("t", "", "") + +-- telescope +map("n", "ff", "Telescope find_files", { desc = "[F]ind [F]iles" }) +map("n", "fh", "Telescope help_tags", { desc = "[F]ind [H]elp" }) +map("n", "fr", "Telescope oldfiles", { desc = "[F]ind [R]ecent" }) +map( + "n", + "fsb", + "Telescope current_buffer_fuzzy_find", + { desc = "[F]ind [S]tring in current [B]uffer" } +) +map("n", "fsg", "Telescope live_grep", { desc = "[F]ind [S]tring [G]lobal" }) +map("n", "fgg", "Telescope git_files", { desc = "[F]ind [G]it" }) +map("n", "fgs", "Telescope git_status", { desc = "[F]ind [G]it [S]tatus" }) +map("n", "fgc", "Telescope git_commits", { desc = "[F]ind [G]it [C]ommits" }) +map( + "n", + "", + "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", + { desc = "[ ] Find Buffers" } +) + +-- lsp +map("n", "gd", "Telescope lsp_definitions", { desc = "[G]oto [D]efinition" }) +map("n", "gr", "Telescope lsp_references", { desc = "[G]oto [R]eferences" }) +map("n", "gI", "Telescope lsp_implementations", { desc = "[G]oto [I]mplementations" }) +map("n", "gD", vim.lsp.buf.declaration, { desc = "[G]oto [D]eclaration" }) +map("n", "", function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) +end, { desc = "Toggle Inlay Hint" }) +map("n", "ca", vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" }) +map("n", "ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" }) +map("n", "ds", require("telescope.builtin").lsp_document_symbols, { desc = "[D]ocument [S]ymbols" }) +map("n", "rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" }) + +-- nvimtree +map("n", "n", "Neotree toggle", { desc = "Toggle Filetree Window" }) +map("n", "e", "Neotree focus", { desc = "Focus Filetree Window" }) + +-- comment +-- _ represents the / key here +local comment_api = require("Comment.api") +map({ "n", "i" }, "", function() + comment_api.toggle.linewise.current() +end, { desc = "Toggle Comment" }) +map("x", "", function() + local esc = vim.api.nvim_replace_termcodes("", true, false, true) + vim.api.nvim_feedkeys(esc, "nx", false) + comment_api.toggle.linewise(vim.fn.visualmode()) +end, { desc = "Toggle Comment" }) + +-- trouble +map("n", "t", "TroubleToggle", { desc = "Trouble Toggle" }) + +-- whichkey +map("n", "wK", "WhichKey", { desc = "Whichkey show all keymaps" }) diff --git a/.config/nvim/lua/nvwynd/options.lua b/.config/nvim/lua/nvwynd/options.lua new file mode 100644 index 0000000..ead8a76 --- /dev/null +++ b/.config/nvim/lua/nvwynd/options.lua @@ -0,0 +1,61 @@ +local g = vim.g +local o = vim.o + +-- changing the leader key +g.mapleader = " " +g.localleader = " " + +-- line numbers +o.number = true +o.relativenumber = true + +-- enable mouse mode, can be useful for resizing splits for example or when you're feeling lazy +o.mouse = "a" + +-- nice colors +o.termguicolors = true + +-- random sets +o.numberwidth = 2 +o.undofile = true +-- sync clipboard between OS and Neovim. +o.clipboard = "unnamedplus" +o.hlsearch = false +o.incsearch = true +o.scrolloff = 8 +o.updatetime = 50 +o.colorcolumn = "100" + +-- wrapping +-- disabled by default, should be enabled manually on a per case basis such as in markdown files +o.wrap = false +o.textwidth = 0 +o.wrapmargin = 0 +o.linebreak = true + +-- splits +o.splitright = true +o.splitbelow = true + +-- preview substitutions live, as you type! +o.inccommand = "split" + +-- folding +o.foldmethod = "indent" +o.foldnestmax = 10 +o.foldenable = true +o.foldlevel = 5 +g.markdown_folding = 1 + +-- tab size +o.shiftwidth = 4 +o.tabstop = 4 + +-- disable netrw +g.loaded_netrw = 1 +g.loaded_netrwPlugin = 1 + +vim.diagnostic.config({ + update_in_insert = true, + virtual_text = true, +}) diff --git a/.config/nvim/lua/nvwynd/plugins/colorscheme.lua b/.config/nvim/lua/nvwynd/plugins/colorscheme.lua new file mode 100644 index 0000000..93a3924 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/colorscheme.lua @@ -0,0 +1,11 @@ +return { + { + "catppuccin/nvim", + lazy = false, + name = "catppuccin", + priority = 1000, + config = function() + vim.cmd.colorscheme("catppuccin-macchiato") + end, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/completion.lua b/.config/nvim/lua/nvwynd/plugins/completion.lua new file mode 100644 index 0000000..b3ff6f6 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/completion.lua @@ -0,0 +1,64 @@ +return { + { + "hrsh7th/nvim-cmp", + lazy = false, + priority = 100, + dependencies = { + "onsails/lspkind.nvim", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-path", + "hrsh7th/cmp-buffer", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + }, + config = function() + vim.opt.completeopt = { "menu", "menuone", "noselect" } + + -- some nice cmp icons + local lspkind = require("lspkind") + lspkind.init({}) + + local cmp = require("cmp") + + cmp.setup({ + mapping = cmp.mapping.preset.insert({ + -- `Enter` key to confirm completion + [""] = cmp.mapping.confirm({ select = false }), + + -- `Esc` key to close the menu + [""] = cmp.mapping.abort(), + + -- Ctrl+Space to trigger completion menu + [""] = cmp.mapping.complete(), + + -- Scroll up and down in the completion documentation + -- [""] = cmp.mapping.scroll_docs(-4), + -- [""] = cmp.mapping.scroll_docs(4), + }), + sources = cmp.config.sources({ + { + name = "nvim_lsp", + entry_filter = function(entry, ctx) + -- 1 is the Text entry from LSP specs + -- https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemKind + if entry:get_kind() == 1 then + return false + end + return true + end, + }, + { name = "path" }, + -- { name = "buffer" }, + }), + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + formatting = { + format = lspkind.cmp_format({}), + }, + }) + end, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/editor.lua b/.config/nvim/lua/nvwynd/plugins/editor.lua new file mode 100644 index 0000000..54c6ea3 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/editor.lua @@ -0,0 +1,45 @@ +return { + { + "nvim-telescope/telescope.nvim", + version = false, + dependencies = { "nvim-lua/plenary.nvim" }, + }, + + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + "3rd/image.nvim", + }, + lazy = false, + init = function() + -- opens neotree focused and filling the entire window if no argument is passed + if vim.fn.argc() == 0 then + require("neo-tree").setup() + -- position=current is the key here to open neotree on the entire screen and + -- its the same thing as using filesystem.hijack_netrw_behavior = "open_current" + vim.cmd("Neotree focus position=current") + end + end, + opts = {}, + }, + + { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = {}, + }, + + { + "folke/which-key.nvim", + event = "VeryLazy", + opts = {}, + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 500 + end, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/formatting.lua b/.config/nvim/lua/nvwynd/plugins/formatting.lua new file mode 100644 index 0000000..8ffcbe5 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/formatting.lua @@ -0,0 +1,38 @@ +return { + { + "stevearc/conform.nvim", + event = { "BufWritePre" }, + cmd = { "ConformInfo" }, + keys = { + { + "fc", + function() + require("conform").format({ async = true, lsp_fallback = true }) + end, + mode = "", + desc = "[F]ormat [C]ode inside current buffer", + }, + }, + opts = { + formatters_by_ft = { + lua = { "stylua" }, + python = { "ruff_format" }, + rust = { "rustfmt" }, + html = { "prettier" }, + htmldjango = { "prettier" }, + css = { "prettier" }, + json = { "prettier" }, + scss = { "prettier" }, + markdown = { "dprint" }, + zig = { "zigfmt" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, + }, + init = function() + vim.o.formatexpr = "v:lua.require('conform').formatexpr()" + end, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/lsp.lua b/.config/nvim/lua/nvwynd/plugins/lsp.lua new file mode 100644 index 0000000..2101847 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/lsp.lua @@ -0,0 +1,131 @@ +return { + { + "neovim/nvim-lspconfig", + dependencies = { + { "j-hui/fidget.nvim", opts = {} }, + }, + config = function() + local lsp_zero = require("lsp-zero") + lsp_zero.extend_lspconfig() + + local lspconfig = require("lspconfig") + local capabilities = require("cmp_nvim_lsp").default_capabilities() + + -- Python + lspconfig.pyright.setup({ + capabilities = capabilities, + }) + + -- Rust + lspconfig.rust_analyzer.setup({ + capabilities = capabilities, + settings = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy", + }, + hover = { + actions = { + references = { enable = true }, + }, + }, + inlayHints = { + closureReturnTypeHints = { enable = "always" }, + lifetimeElisionHints = { enable = "always" }, + reborrowHints = { enable = "always" }, + }, + }, + }, + }) + + -- HTMX + -- lspconfig.htmx.setup({ + -- capabilities = capabilities, + -- filetypes = { "html", "templ", "htmldjango" }, + -- }) + + -- Lua + local lua_rtp = vim.split(package.path, ";") + table.insert(lua_rtp, "lua/?.lua") + table.insert(lua_rtp, "lua/?/init.lua") + + lspconfig.lua_ls.setup({ + capabilities = capabilities, + settings = { + Lua = { + runtime = { + version = "LuaJIT", + path = lua_rtp, + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + diagnostics = { + globals = { "vim" }, + }, + telemetry = { + enable = false, + }, + }, + }, + }) + + -- Zig + lspconfig.zls.setup({ + capabilities = capabilities, + }) + + -- HTML + lspconfig.html.setup({ + capabilities = capabilities, + filetypes = { "html", "templ", "htmldjango" }, + }) + + -- CSS + lspconfig.cssls.setup({ + capabilities = capabilities, + }) + + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("nvwynd-lsp-attach", { clear = true }), + callback = function(event) + -- does word highlighting (across the entire file) whenever the cursor is on one + local client = vim.lsp.get_client_by_id(event.data.client_id) + if client and client.server_capabilities.documentHighlightProvider then + vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + buffer = event.buf, + callback = vim.lsp.buf.document_highlight, + }) + + vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { + buffer = event.buf, + callback = vim.lsp.buf.clear_references, + }) + end + end, + }) + end, + }, + + { + "VonHeikemen/lsp-zero.nvim", + opts = {}, + lazy = true, + dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/nvim-cmp", "L3MON4D3/LuaSnip" }, + config = function() + local lsp_zero = require("lsp-zero") + + lsp_zero.on_attach(function(client, bufnr) + lsp_zero.default_keymaps({ + buffer = bufnr, + preserve_mappings = false, + }) + end) + end, + }, + + { + "folke/neodev.nvim", + opts = {}, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/treesitter.lua b/.config/nvim/lua/nvwynd/plugins/treesitter.lua new file mode 100644 index 0000000..9011a36 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/treesitter.lua @@ -0,0 +1,49 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local configs = require("nvim-treesitter.configs") + + configs.setup({ + ensure_installed = { + -- web dev + "html", + "css", + "scss", + "javascript", + "typescript", + + -- config + "toml", + "yaml", + "markdown", + "dockerfile", + + -- vim + "vim", + "vimdoc", + "lua", + "query", + + -- the cool stuff + "elixir", + "heex", + "rust", + "python", + "zig", + "bash", + + -- the not so cool stuff + "c", + "java", + "groovy", + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + autotag = { enable = true }, + }) + end, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/ui.lua b/.config/nvim/lua/nvwynd/plugins/ui.lua new file mode 100644 index 0000000..a9bab49 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/ui.lua @@ -0,0 +1,11 @@ +return { + { + "stevearc/dressing.nvim", + opts = {}, + }, + + { + "rcarriga/nvim-notify", + opts = {}, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/util.lua b/.config/nvim/lua/nvwynd/plugins/util.lua new file mode 100644 index 0000000..586cd8c --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/util.lua @@ -0,0 +1,25 @@ +return { + { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = true, + opts = {}, + }, + + { + "windwp/nvim-ts-autotag", + opts = {}, + }, + + { + "numToStr/Comment.nvim", + opts = {}, + lazy = false, + }, + + { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = {}, + }, +} diff --git a/.config/nvim/lua/nvwynd/plugins/zen.lua b/.config/nvim/lua/nvwynd/plugins/zen.lua new file mode 100644 index 0000000..0ae1ad3 --- /dev/null +++ b/.config/nvim/lua/nvwynd/plugins/zen.lua @@ -0,0 +1,11 @@ +return { + { + "folke/twilight.nvim", + opts = {}, + }, + + { + "folke/zen-mode.nvim", + opts = {}, + }, +} diff --git a/.config/nvim/spell/en.utf-8.add b/.config/nvim/spell/en.utf-8.add new file mode 100644 index 0000000..5818f5f --- /dev/null +++ b/.config/nvim/spell/en.utf-8.add @@ -0,0 +1,15 @@ +config +npcs +nvim +configs +dotfiles +patreon +todo +GTK +xwayland +pve +SFX +NPCs +NPC +Glowstone +Eisen diff --git a/.config/nvim/spell/en.utf-8.add.spl b/.config/nvim/spell/en.utf-8.add.spl new file mode 100644 index 0000000000000000000000000000000000000000..ba2b5d68d4b3417dee7be3d84d510fc338b6de71 GIT binary patch literal 193 zcmX9&F%H5o4D?xD-~)XI5?_FY0mQ^!HK9U;G{R8IMMnqh3!=Pdi!dzj12Si#UW$YtVHDvNH;!_#iO {dest_path}") + + +if __name__ == "__main__": + config = load("./dot.toml")["dots"] + + parser = ArgumentParser() + parser.add_argument( + "--init", + action="store_true", + help="Copies all the specified files in the current directory", + required=False, + default=False, + dest="init", + ) + parser.add_argument( + "--deploy", + action="store_true", + help="Deploys all dot files in the current directory to their locations", + required=False, + default=False, + dest="deploy", + ) + args = parser.parse_args() + + if args.init: + manage_dot_files(config) + elif args.deploy: + manage_dot_files(config, True) + else: + print("No argument passed (--init or --deploy), closing without any changes.") diff --git a/dot.toml b/dot.toml new file mode 100644 index 0000000..1b7794f --- /dev/null +++ b/dot.toml @@ -0,0 +1,26 @@ +[[dots]] +path = "~/.zshrc" + +[[dots]] +path = "~/.gitconfig" + +[[dots]] +path = "~/.config/starship.toml" + +[[dots]] +path = "~/.config/tmux/tmux.conf" + +[[dots]] +path = "~/.config/nvim/**/*" +ignore = [ + "README.md$" +] + +[[dots]] +path = "~/.config/mpv/*.conf" + +[[dots]] +path = "~/.config/btop/btop.conf" + +[[dots]] +path = "~/.config/alacritty/*"