summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2025-12-12 15:49:57 +0100
committerpks <pks@pks.rocks>2025-12-12 15:49:57 +0100
commit6dd88149c6172e22168884e70304896ce331e037 (patch)
tree75d0b1a081d553e73060250ce4463f9d8ff9049a
parentec01a19180f30f3b48e923b6c0704c299c13778c (diff)
-rw-r--r--alacritty/.config/alacritty/alacritty.toml39
-rw-r--r--neovim/.config/nvim/init.lua203
-rw-r--r--packages/debian.txt3
-rw-r--r--packages/macos-macports.txt4
-rw-r--r--vim/.vimrc1
-rw-r--r--zsh/.zshrc2
6 files changed, 242 insertions, 10 deletions
diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml
new file mode 100644
index 0000000..e097404
--- /dev/null
+++ b/alacritty/.config/alacritty/alacritty.toml
@@ -0,0 +1,39 @@
+[cursor.style]
+blinking = "Always"
+shape = "Block"
+
+[font]
+size = 32.0
+builtin_box_drawing = true
+
+[font.bold]
+family = "Myna"
+style = "Bold"
+
+[font.bold_italic]
+family = "Myna"
+style = "Bold Italic"
+
+[font.italic]
+family = "Myna"
+style = "Italic"
+
+[font.normal]
+family = "Myna"
+style = "Regular"
+
+[scrolling]
+history = 100000
+
+[selection]
+save_to_clipboard = true
+semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"
+
+[window]
+decorations = "none"
+dynamic_title = true
+opacity = 0.0
+startup_mode = "Fullscreen"
+
+[keyboard]
+bindings = [ { key="W", mods="Command", action="None" } ]
diff --git a/neovim/.config/nvim/init.lua b/neovim/.config/nvim/init.lua
index 1a7ffa3..c92916e 100644
--- a/neovim/.config/nvim/init.lua
+++ b/neovim/.config/nvim/init.lua
@@ -29,7 +29,8 @@ vim.opt.splitright = true
-- Folding (treesitter-based)
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-vim.opt.foldenable = false
+vim.opt.foldenable = true
+vim.opt.foldlevelstart = 0
-- Misc
vim.opt.clipboard = "unnamedplus"
@@ -40,7 +41,7 @@ vim.opt.updatetime = 250
-- Bootstrap lazy.nvim
--------------------------------------------------------------------------------
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-if not vim.uv.fs_stat(lazypath) then
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git", "clone", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
@@ -59,7 +60,14 @@ require("lazy").setup({
"Shadorain/shadotheme",
lazy = false,
priority = 1000,
- config = function() vim.cmd.colorscheme("shado") end,
+ config = function()
+ vim.cmd.colorscheme("shado")
+ vim.api.nvim_set_hl(0, "Normal", { bg = "#000000" })
+ vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#000000" })
+ vim.api.nvim_set_hl(0, "SignColumn", { bg = "#000000" })
+ vim.api.nvim_set_hl(0, "LineNr", { bg = "#000000" })
+ vim.api.nvim_set_hl(0, "CursorLineNr", { bg = "#000000" })
+ end,
},
-- Treesitter ----------------------------------------------------------------
@@ -134,6 +142,7 @@ require("lazy").setup({
{ "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = {} },
{ "lewis6991/gitsigns.nvim", opts = {} },
{ "folke/which-key.nvim", event = "VeryLazy", opts = {} },
+ { "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
-- Navigation ----------------------------------------------------------------
{
@@ -147,13 +156,27 @@ require("lazy").setup({
opts = {},
keys = { { "<leader>o", "<cmd>Outline<cr>", desc = "Code outline" } },
},
- { "junegunn/fzf", build = "./install --bin" },
{
- "junegunn/fzf.vim",
+ "nvim-telescope/telescope.nvim",
+ branch = "0.1.x",
+ dependencies = { "nvim-lua/plenary.nvim" },
keys = {
- { "<leader>ff", "<cmd>Files<cr>", desc = "Find files" },
- { "<leader>fg", "<cmd>Rg<cr>", desc = "Live grep" },
- { "<leader>fb", "<cmd>Buffers<cr>", desc = "Buffers" },
+ { "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" },
+ { "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live grep" },
+ { "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" },
+ { "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help tags" },
+ { "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent files" },
+ { "<leader>fc", "<cmd>Telescope git_commits<cr>", desc = "Git commits" },
+ { "<leader>fs", "<cmd>Telescope lsp_document_symbols<cr>", desc = "Document symbols" },
+ },
+ },
+ {
+ "folke/flash.nvim",
+ event = "VeryLazy",
+ opts = {},
+ 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" },
},
},
@@ -166,6 +189,61 @@ require("lazy").setup({
{ "gc", mode = "v", desc = "Comment selection" },
},
},
+ {
+ "kylechui/nvim-surround",
+ version = "^3",
+ event = "VeryLazy",
+ opts = {},
+ },
+ { "echasnovski/mini.ai", version = "*", opts = {} },
+
+ -- Diagnostics & Formatting --------------------------------------------------
+ {
+ "folke/trouble.nvim",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ opts = {},
+ keys = {
+ { "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics" },
+ { "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer diagnostics" },
+ { "<leader>xq", "<cmd>Trouble quickfix toggle<cr>", desc = "Quickfix list" },
+ },
+ },
+ {
+ "folke/todo-comments.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ opts = {},
+ keys = {
+ { "<leader>xt", "<cmd>Trouble todo toggle<cr>", desc = "Todo comments" },
+ { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo" },
+ { "[t", function() require("todo-comments").jump_prev() end, desc = "Prev todo" },
+ },
+ },
+ {
+ "stevearc/conform.nvim",
+ event = "BufWritePre",
+ keys = {
+ { "<leader>cf", function() require("conform").format({ async = true }) end, desc = "Format buffer" },
+ },
+ opts = {
+ formatters_by_ft = {
+ lua = { "stylua" },
+ python = { "ruff_format", "ruff_fix" },
+ javascript = { "prettier" },
+ typescript = { "prettier" },
+ javascriptreact = { "prettier" },
+ typescriptreact = { "prettier" },
+ json = { "prettier" },
+ yaml = { "prettier" },
+ html = { "prettier" },
+ css = { "prettier" },
+ markdown = { "prettier" },
+ ruby = { "rubocop" },
+ sh = { "shfmt" },
+ bash = { "shfmt" },
+ zsh = { "shfmt" },
+ },
+ },
+ },
-- Notes ---------------------------------------------------------------------
{ "vimwiki/vimwiki" },
@@ -199,12 +277,121 @@ vim.lsp.config.solargraph = {
single_file_support = true,
}
+vim.lsp.config.yamlls = {
+ cmd = { "yaml-language-server", "--stdio" },
+ filetypes = { "yaml", "yaml.docker-compose", "yaml.gitlab" },
+ root_markers = { ".git" },
+ single_file_support = true,
+ settings = {
+ yaml = {
+ validate = true,
+ schemaStore = { enable = true, url = "https://www.schemastore.org/api/json/catalog.json" },
+ },
+ },
+}
+
+vim.lsp.config.taplo = {
+ cmd = { "taplo", "lsp", "stdio" },
+ filetypes = { "toml" },
+ root_markers = { ".git" },
+ single_file_support = true,
+}
+
+vim.lsp.config.lua_ls = {
+ cmd = { "lua-language-server" },
+ filetypes = { "lua" },
+ root_markers = { ".luarc.json", ".luarc.jsonc", ".git" },
+ single_file_support = true,
+ settings = {
+ Lua = {
+ runtime = { version = "LuaJIT" },
+ workspace = { library = { vim.env.VIMRUNTIME } },
+ telemetry = { enable = false },
+ },
+ },
+}
+
+vim.lsp.config.bashls = {
+ cmd = { "bash-language-server", "start" },
+ filetypes = { "sh", "bash", "zsh" },
+ root_markers = { ".git" },
+ single_file_support = true,
+}
+
+vim.lsp.config.jsonls = {
+ cmd = { "vscode-json-language-server", "--stdio" },
+ filetypes = { "json", "jsonc" },
+ root_markers = { ".git" },
+ single_file_support = true,
+ settings = {
+ json = {
+ validate = { enable = true },
+ schemaStore = { enable = true, url = "https://www.schemastore.org/api/json/catalog.json" },
+ },
+ },
+}
+
+vim.lsp.config.html = {
+ cmd = { "vscode-html-language-server", "--stdio" },
+ filetypes = { "html", "templ" },
+ root_markers = { ".git" },
+ single_file_support = true,
+}
+
+vim.lsp.config.cssls = {
+ cmd = { "vscode-css-language-server", "--stdio" },
+ filetypes = { "css", "scss", "less" },
+ root_markers = { ".git" },
+ single_file_support = true,
+}
+
+vim.lsp.config.ts_ls = {
+ cmd = { "typescript-language-server", "--stdio" },
+ filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
+ root_markers = { "tsconfig.json", "jsconfig.json", "package.json", ".git" },
+ single_file_support = true,
+}
+
+vim.lsp.config.dockerls = {
+ cmd = { "docker-langserver", "--stdio" },
+ filetypes = { "dockerfile" },
+ root_markers = { "Dockerfile", ".git" },
+ single_file_support = true,
+}
+
+vim.lsp.config.clangd = {
+ cmd = { "clangd" },
+ filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto" },
+ root_markers = { "compile_commands.json", "compile_flags.txt", ".clangd", ".git" },
+ single_file_support = true,
+}
+
vim.lsp.enable("pyright")
vim.lsp.enable("solargraph")
+vim.lsp.enable("yamlls")
+vim.lsp.enable("taplo")
+vim.lsp.enable("lua_ls")
+vim.lsp.enable("bashls")
+vim.lsp.enable("jsonls")
+vim.lsp.enable("html")
+vim.lsp.enable("cssls")
+vim.lsp.enable("ts_ls")
+vim.lsp.enable("dockerls")
+vim.lsp.enable("clangd")
+
+--------------------------------------------------------------------------------
+-- Tabline styling
+--------------------------------------------------------------------------------
+vim.api.nvim_set_hl(0, "TabLineSel", { fg = "#ffffff", bg = "#5a5a5a", bold = true })
+vim.api.nvim_set_hl(0, "TabLine", { fg = "#888888", bg = "#000000" })
+vim.api.nvim_set_hl(0, "TabLineFill", { bg = "#000000" })
--------------------------------------------------------------------------------
-- Keymaps
--------------------------------------------------------------------------------
+vim.keymap.set("n", "<S-h>", "<cmd>tabprev<cr>", { desc = "Prev tab" })
+vim.keymap.set("n", "<S-l>", "<cmd>tabnext<cr>", { desc = "Next tab" })
+
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local map = function(key, fn, desc)
diff --git a/packages/debian.txt b/packages/debian.txt
index c8338b6..cc6c379 100644
--- a/packages/debian.txt
+++ b/packages/debian.txt
@@ -2,15 +2,18 @@ build-essential
cmake
colordiff
dh-autoreconf
+etckeeper
git
htop
lsof
mosh
multitail
+neovim
pigz
renameutils
stow
tmux
+units
vim
xinput
zsh
diff --git a/packages/macos-macports.txt b/packages/macos-macports.txt
index 9b8e040..f80bea9 100644
--- a/packages/macos-macports.txt
+++ b/packages/macos-macports.txt
@@ -9,15 +9,19 @@ gnupg2
htop
isync
jq
+k9s
md5sha1sum
mosh
mpv
multitail
mutt
+neovim
notmuch
pigz
renameutils
+stern
stow
+terraform
texlive-latex
tmux
vim
diff --git a/vim/.vimrc b/vim/.vimrc
index 418b7fe..050b8e9 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -4,7 +4,6 @@ execute pathogen#infect()
" settings
set nocompatible
set nu
-set noet
set showcmd
set autoindent
set smartindent
diff --git a/zsh/.zshrc b/zsh/.zshrc
index ba081c7..8dd203a 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -196,7 +196,7 @@ if [[ $? == 0 ]]; then
maybe_add_dir_to_path $HOME/.R
fi
-export EDITOR='vim -p'
+export EDITOR='nvim -p'
alias qmv='qmv -evim -fdo'
export LC_ALL=en_US.UTF-8