Initial commit

master
Wynd 2024-05-24 16:07:28 +03:00
commit 2b847a7cf3
31 changed files with 1494 additions and 0 deletions

View File

@ -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" },
]

View File

@ -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"

View File

@ -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"

View File

@ -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}"

View File

@ -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

View File

@ -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)

View File

@ -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" })

View File

@ -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")

View File

@ -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" }
}

View File

@ -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, {})

View File

@ -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")

View File

@ -0,0 +1,67 @@
local map = vim.keymap.set
-- generic
map("n", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
map("i", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
map("n", "<C-X>", "<cmd>bd!<CR>", { desc = "Close Buffer" })
map("v", "J", ":m '>+1<CR>gv=gv")
map("v", "K", ":m '<-2<CR>gv=gv")
-- terminal
map("t", "<ESC>", "<C-\\><C-n>")
-- telescope
map("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "[F]ind [F]iles" })
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", { desc = "[F]ind [H]elp" })
map("n", "<leader>fr", "<cmd>Telescope oldfiles<CR>", { desc = "[F]ind [R]ecent" })
map(
"n",
"<leader>fsb",
"<cmd>Telescope current_buffer_fuzzy_find<CR>",
{ desc = "[F]ind [S]tring in current [B]uffer" }
)
map("n", "<leader>fsg", "<cmd>Telescope live_grep<CR>", { desc = "[F]ind [S]tring [G]lobal" })
map("n", "<leader>fgg", "<cmd>Telescope git_files<cr>", { desc = "[F]ind [G]it" })
map("n", "<leader>fgs", "<cmd>Telescope git_status<CR>", { desc = "[F]ind [G]it [S]tatus" })
map("n", "<leader>fgc", "<cmd>Telescope git_commits<CR>", { desc = "[F]ind [G]it [C]ommits" })
map(
"n",
"<leader><leader>",
"<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<CR>",
{ desc = "[ ] Find Buffers" }
)
-- lsp
map("n", "gd", "<cmd>Telescope lsp_definitions<cr>", { desc = "[G]oto [D]efinition" })
map("n", "gr", "<cmd>Telescope lsp_references<cr>", { desc = "[G]oto [R]eferences" })
map("n", "gI", "<cmd>Telescope lsp_implementations<cr>", { desc = "[G]oto [I]mplementations" })
map("n", "gD", vim.lsp.buf.declaration, { desc = "[G]oto [D]eclaration" })
map("n", "<S-z>", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, { desc = "Toggle Inlay Hint" })
map("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" })
map("n", "<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" })
map("n", "<leader>ds", require("telescope.builtin").lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" })
-- nvimtree
map("n", "<leader>n", "<cmd>Neotree toggle<CR>", { desc = "Toggle Filetree Window" })
map("n", "<leader>e", "<cmd>Neotree focus<CR>", { desc = "Focus Filetree Window" })
-- comment
-- _ represents the / key here
local comment_api = require("Comment.api")
map({ "n", "i" }, "<C-_>", function()
comment_api.toggle.linewise.current()
end, { desc = "Toggle Comment" })
map("x", "<C-_>", function()
local esc = vim.api.nvim_replace_termcodes("<ESC>", true, false, true)
vim.api.nvim_feedkeys(esc, "nx", false)
comment_api.toggle.linewise(vim.fn.visualmode())
end, { desc = "Toggle Comment" })
-- trouble
map("n", "<leader>t", "<cmd>TroubleToggle<CR>", { desc = "Trouble Toggle" })
-- whichkey
map("n", "<leader>wK", "<cmd>WhichKey<CR>", { desc = "Whichkey show all keymaps" })

View File

@ -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,
})

View File

@ -0,0 +1,11 @@
return {
{
"catppuccin/nvim",
lazy = false,
name = "catppuccin",
priority = 1000,
config = function()
vim.cmd.colorscheme("catppuccin-macchiato")
end,
},
}

View File

@ -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
["<CR>"] = cmp.mapping.confirm({ select = false }),
-- `Esc` key to close the menu
["<ESC>"] = cmp.mapping.abort(),
-- Ctrl+Space to trigger completion menu
["<C-Space>"] = cmp.mapping.complete(),
-- Scroll up and down in the completion documentation
-- ["<S-q>"] = cmp.mapping.scroll_docs(-4),
-- ["<S-a>"] = 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,
},
}

View File

@ -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,
},
}

View File

@ -0,0 +1,38 @@
return {
{
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>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,
},
}

View File

@ -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 = {},
},
}

View File

@ -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,
},
}

View File

@ -0,0 +1,11 @@
return {
{
"stevearc/dressing.nvim",
opts = {},
},
{
"rcarriga/nvim-notify",
opts = {},
},
}

View File

@ -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 = {},
},
}

View File

@ -0,0 +1,11 @@
return {
{
"folke/twilight.nvim",
opts = {},
},
{
"folke/zen-mode.nvim",
opts = {},
},
}

View File

@ -0,0 +1,15 @@
config
npcs
nvim
configs
dotfiles
patreon
todo
GTK
xwayland
pve
SFX
NPCs
NPC
Glowstone
Eisen

Binary file not shown.

View File

@ -0,0 +1,227 @@
"$schema" = 'https://starship.rs/config-schema.json'
add_newline = true
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
($sudo )\
$directory\
$nodejs\
$java\
$rust\
$python\
$ruby\
$deno\
$dotnet\
$c\
$cmake\
$cobol\
$dart\
$elixir\
$elm\
$erlang\
$golang\
$haskell\
$helm\
$julia\
$kotlin\
$lua\
$nim\
$ocaml\
$perl\
$php\
$pulumi\
$purescript\
$rlang\
$red\
$scala\
$swift\
$vlang\
$vagrant\
$zig\
$vcsh\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$hg_branch\
$docker_context\
$package\
$buf\
$container\
$terraform\
$nix_shell\
$conda\
$spack\
$memory_usage\
$aws\
$gcloud\
$openstack\
$azure\
$env_var\
$crystal\
$custom\
$cmd_duration\
$line_break\
$jobs\
$battery\
$time\
$status\
$shell\
$character"""
[package]
format = '| [$symbol$version]($style) '
disabled = false
symbol = " "
[time]
format = '[$time]($style)'
disabled = false
[cmd_duration]
format = '| [⏱ $duration]($style) '
[git_branch]
format = '| [$symbol$branch]($style) '
[git_metrics]
format = '((\([+$added]($added_style))([-$deleted]($deleted_style))\) )'
disabled = false
[git_status]
format = '(([$stashed](bright-yellow bold) )([$conflicted$deleted$renamed$modified]($style) )([$staged](green bold) )([$untracked]($style) )([$ahead_behind](green bold) ))'
untracked = '…'
conflicted = '(⚠ $count)'
ahead = '⇡ $count'
behind = '⇣ $count'
diverged = '([⇡ $ahead_count](green bold) )([⇣ $behind_count](red bold) )'
deleted = '[-$count](red bold)'
staged = '[+$count](green bold)'
modified = '!'
[directory]
read_only = " "
[sudo]
format = '[$symbol] '
[docker_context]
format = '[$symbol$context]($style)'
symbol = " "
[c]
format = '[$symbol]($style)'
symbol = " "
[java]
format = '[$symbol]($style)'
symbol = ' '
style = 'yellow bold'
[buf]
format = "[$symbol]($style)"
[cmake]
format = "[$symbol]($style)"
[cobol]
format = "[$symbol]($style)"
[crystal]
format = "[$symbol]($style)"
[dart]
format = "[$symbol]($style)"
[deno]
format = "[$symbol]($style)"
[dotnet]
format = "[$symbol(🎯 $tfm )]($style)"
symbol = '.NET '
[elixir]
format = '[$symbol]($style)'
[elm]
format = '[$symbol]($style)'
[erlang]
format = '[$symbol]($style)'
[golang]
format = '[$symbol]($style)'
[helm]
format = '[$symbol]($style)'
[julia]
format = '[$symbol]($style)'
[kotlin]
format = '[$symbol]($style)'
[lua]
format = '[$symbol]($style)'
[nim]
format = '[$symbol]($style)'
[nodejs]
format = '[$symbol]($style)'
symbol = " "
[ocaml]
format = '[$symbol(\($switch_indicator$switch_name\) )]($style)'
[perl]
format = '[$symbol]($style)'
[php]
format = '[$symbol]($style)'
[pulumi]
format = '[$symbol$stack]($style)'
[purescript]
format = '[$symbol]($style)'
[python]
format = '[$symbol]($style)'
symbol = " "
[red]
format = '[$symbol]($style)'
[rlang]
format = '[$symbol]($style)'
[ruby]
format = '[$symbol]($style)'
symbol = ' '
[rust]
format = '[$symbol]($style)'
symbol = " "
[swift]
format = '[$symbol]($style)'
[vagrant]
format = '[$symbol]($style)'
[vlang]
format = '[$symbol]($style)'
[zig]
format = '[$symbol]($style)'

View File

@ -0,0 +1,55 @@
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
# Setting tmux theme
set -g @catppuccin_flavour 'macchiato'
# Change the prefix and unbind the old one
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Start windows and panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Color defaults, helps especially with nvim not having the same colors inside tmux as outside of it
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -g mouse on
set -g set-titles on
setw -g monitor-activity on
# set -g default-shell /home/wynd/.cargo/bin/nu
# Binding for quick reloading
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded TMUX config!"
# Changes the bindings for vertical/horizontal splits and removes the old ones
unbind %
unbind '"'
unbind h
unbind v
bind h split-window -h -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
# switch panes using Alt-arrow without prefix
# bind -n M-Left select-pane -L
# bind -n M-Right select-pane -R
# bind -n M-Up select-pane -U
# bind -n M-Down select-pane -D
# Ctrl + E prompts the renaming command
unbind e
bind e command-prompt -I "#W" "rename-window '%%'"
# Clones TPM if its not already installed
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm/tpm'

34
.gitconfig 100644
View File

@ -0,0 +1,34 @@
[user]
name = Wynd
email = wyndmaster@gmail.com
[credential]
helper = store
[pull]
rebase = false
[http]
postBuffer = 157286400
version = HTTP/2
[core]
pager = delta
editor = nvim -c 'startinsert'
[interactive]
diffFilter = delta --color-only
[add.interactive]
useBuiltin = false # required for git 2.37.0
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
side-by-side = true
line-numbers = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[init]
templatedir = /home/wynd/.git-templates
defaultBranch = master

113
.zshrc 100644
View File

@ -0,0 +1,113 @@
# Set up the prompt
autoload -Uz promptinit
#promptinit
#prompt adam1
setopt histignorespace histignorealldups sharehistory
# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
# Use modern completion system
autoload -Uz compinit
compinit
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
# Custom
# sources & path exports
source ~/antigen.zsh
source $HOME/.cargo/env
# Ruby setup & setting ~/.gems as default path for gems
export GEM_HOME="$HOME/.gems"
export PATH="$HOME/.gems/bin:$PATH"
# asdf setup
source "$HOME/.asdf/asdf.sh"
fpath=(${ASDF_DIR}/completions $fpath)
# autoload -Uz compinit && compinit
# fzf setup
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# antigen bundles
antigen bundle git
antigen bundle pip
antigen bundle command-not-found
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen apply
# aliases
alias python="python3"
alias pip="pip3"
alias ls='exa --icons'
alias ll='exa -alFh --icons'
alias grep='rg'
alias nv='nvim'
# quick helpers
alias uuid='printf "$(uuidgen)" | xclip -selection c'
alias reload="source ~/.zshrc"
alias untar="tar -xvzf"
alias myip="curl http://ipecho.net/plain; echo"
alias diskspace="df -ht ext4"
# git shortcuts
alias git-line-stats="git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr"
alias glo="git log --pretty='format:%C(yellow)%as %C(blue)%cn %C(green)%h %C(reset)%s' --no-merges"
# private SSH stuff
source ~/.piwrc
# JVM switches
alias use-java8='export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;export PATH=$JAVA_HOME/bin:$PATH'
alias use-java11='export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64;export PATH=$JAVA_HOME/bin:$PATH'
alias use-java17='export JAVA_HOME=/usr/lib/jvm/java-17-temurin;export PATH=$JAVA_HOME/bin:$PATH'
# changing GREP highlight color
export GREP_COLORS='ms=01;04;32'
# some wayland specific setup
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
# Forces Firefox to use wayland instead xwayland when the session type is wayland
export MOZ_ENABLE_WAYLAND=1
# Forces OBS to use xwayland since on pure wayland global shortcuts aint working
# Future note, wayland version kinda faster tho so...we just ballin with a WS server for global shortcuts and its fine
# export QT_QPA_PLATFORM=xcb
fi
# change cd for zoxide
eval "$(zoxide init --cmd cd zsh)"
# clears the screen and displays the figlet
clear
figlet -f 'Red Phoenix' Wynd | lolcat
# starts starship
eval "$(starship init zsh)"

13
README.md 100644
View File

@ -0,0 +1,13 @@
# .dotfiles
Not meant to be directly reused by anybody other than me, you should read what it contains and take whatever parts you think will work for your specific setup.
## usage
Comes with a small python script to automate the init and deploy procedures by simply copying the files in their required spots based on the `dot.toml` config file.
`./dot.py --init` to copy all the dotfiles in the currently selected folder
`./dot.py --deploy` to copy them back to where they're supposed to be
The script is extremely opinionated as it will always save them in the currently selected folder and load them based on the home directory of the user as such: `~/.config/nvim` folder will always be saved in `./.config/nvim` which will always be loaded in `~/.config/nvim`. As such configs or dotfiles outside of the home directory are not supported by this script (which is perfectly fine since I don't have any of those).

62
dot.py 100755
View File

@ -0,0 +1,62 @@
#!/bin/python3
import os
import re
from shutil import copyfile
from toml import load
from glob import glob
from argparse import ArgumentParser
def manage_dot_files(dots, deploy=False):
home_path = os.path.expanduser("~/")
for dot in dots:
path = os.path.expanduser(dot["path"])
if deploy:
path = str(path).replace(home_path, "./")
ignore_list = dot["ignore"] if "ignore" in dot else []
for file in glob(path, recursive=True):
exp_pass = True
for exp in ignore_list:
match = re.search(exp, file)
if match is not None:
exp_pass = False
break
if exp_pass and os.path.isfile(file):
if deploy:
dest_path = file.replace("./", home_path)
else:
dest_path = file.replace(home_path, "./")
os.makedirs(os.path.dirname(dest_path), exist_ok=True)
copyfile(file, dest_path)
print(f"{file} -> {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.")

26
dot.toml 100644
View File

@ -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/*"