diff --git a/.config/i3/config b/.config/i3/config index 7ca272d..682450c 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -15,6 +15,7 @@ set $mod Mod4 #set $mod Mod1 # helper scripts location +set $scriptsDir ~/.config/i3/scripts/ set $scriptsDir /home/chodylal/.config/i3/scripts/ diff --git a/.config/nvim/.env b/.config/nvim/.env new file mode 100644 index 0000000..db56ce0 --- /dev/null +++ b/.config/nvim/.env @@ -0,0 +1,2 @@ +AVANTE_DEEPSEEK_API_KEY=sk-f0415e7a442944a59020592c7e550e70 +AVANTE_Z_API_KEY=1c71032c639a419eb4d90393fab40f4c.PgITdx53xWWfkNrq diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index d39ae7d..d1e93c7 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,3 +1,5 @@ -- early setup: make sure custom clipboard OSC 52 is registered first, options.lua manages default registry require("config.clipboard") require("config.lazy") + +vim.cmd.Dotenv(vim.fn.stdpath("config") .. "/.env") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 0ba4324..31921fa 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,35 +1,40 @@ { "LazyVim": { "branch": "main", "commit": "83d90f339defdb109a6ede333865a66ffc7ef6aa" }, + "avante.nvim": { "branch": "main", "commit": "f57f541959797bbca76e6e77efeb8b572e0bea2f" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" }, - "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, + "catppuccin": { "branch": "main", "commit": "8edd468af4d63212b84d69b2ddb5ffc9023ef5eb" }, + "conform.nvim": { "branch": "master", "commit": "18aeab3d63d350dcf44d64c462cc489a3412af40" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "dotenv.nvim": { "branch": "main", "commit": "7d516e9293c6e3ac21830fb10a4e8674c02747c6" }, + "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, - "grug-far.nvim": { "branch": "main", "commit": "21790e59dd0109a92a70cb874dd002af186314f5" }, - "hybrid-theme": { "branch": "main", "commit": "f67e65511ec856fa0ce7d1b71d6bb02b59063d49" }, + "grug-far.nvim": { "branch": "main", "commit": "5506c2f59dc9ab2ed6c233585412b24d31d51521" }, + "hybrid-theme": { "branch": "main", "commit": "e09de613941e761e2dd75901a65d54979f369877" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, "just-runner.nvim": { "branch": "main", "commit": "f29d405aa828900df242600720a2b0e57261489f" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, - "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, - "mini.ai": { "branch": "main", "commit": "7e10ce8468c0fce4f527ae2c0e5c484f7667f73d" }, - "mini.files": { "branch": "main", "commit": "3e247eb12ca8c05622ceb8745f9004f761b22ef8" }, - "mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" }, - "mini.pairs": { "branch": "main", "commit": "42387c7fe68fc0b6e95eaf37f1bb76e7bffaa0d9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" }, + "mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" }, + "mini.ai": { "branch": "main", "commit": "4ce4c35e411ea329a15d4b15e9c89c2a3089e437" }, + "mini.files": { "branch": "main", "commit": "423d6b5afb7a94e658950d470957f830d43dd41e" }, + "mini.icons": { "branch": "main", "commit": "520995f1d75da0e4cc901ee95080b1ff2bc46b94" }, + "mini.pairs": { "branch": "main", "commit": "30cf2f01c4aaa2033db67376b9924fa2442c05d6" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, - "nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" }, + "nvim-lint": { "branch": "master", "commit": "d48f3a76189d03b2239f6df1b2f7e3fa8353743b" }, + "nvim-lspconfig": { "branch": "master", "commit": "a4ed4e761c400849e8c9f8bda33e5083f890268c" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, "persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, - "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, + "render-markdown.nvim": { "branch": "main", "commit": "629eb9533ec989d9d5c6cab8f3ad5372422c24e0" }, + "snacks.nvim": { "branch": "main", "commit": "0770753c88228f7f15449c6a5b242e3f7cd0d71c" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua index b0a80d1..e7d69e0 100644 --- a/.config/nvim/lua/config/options.lua +++ b/.config/nvim/lua/config/options.lua @@ -7,3 +7,32 @@ vim.opt.clipboard = "unnamedplus" -- Polish spellcheck by default, change runtime by :opt.spelllang = { "en_gb" } vim.opt.spelllang = { "pl,en" } + +--- Disable hiding of markup +vim.opt.conceallevel = 0 + +--- Break lines at word boundaries +vim.opt.wrap = true +vim.opt.linebreak = true + +--- Copy the indent of the current line when inserting a new line +vim.opt.autoindent = true + +--- Disable the inlay hints (additional information about types and parameters names) because it clutters view + +vim.g.lazyvim_no_inlay_hints = true + +-- -- Enable list mode to show whitespace +-- vim.opt.list = true + +-- Configure listchars to use dots (·) for spaces and tabs +vim.opt.listchars = { + tab = "· ", -- Dot for the first part of a tab, followed by space + trail = "·", -- Dot for trailing spaces + nbsp = "+", -- Symbol for non-breaking spaces + extends = ">", -- Symbol for characters that extend beyond the window + precedes = "<", -- Symbol for characters that precede the window + -- eol = "↲", -- Symbol for end of line (optional) +} + + diff --git a/.config/nvim/lua/plugins/avante-ai.lua b/.config/nvim/lua/plugins/avante-ai.lua new file mode 100644 index 0000000..537c9e8 --- /dev/null +++ b/.config/nvim/lua/plugins/avante-ai.lua @@ -0,0 +1,68 @@ +return { + "yetone/avante.nvim", + event = "VeryLazy", + version = false, + ---@module 'avante' + ---@type avante.Config + opts = { + instructions_file = "avante.md", + mode = "agentic", + provider = "z.ai/glm-4.6", + providers = { + ["deepseek/coder"] = { + __inherited_from = "openai", + api_key_name = "DEEPSEEK_API_KEY", + endpoint = "https://api.deepseek.com", + model = "deepseek-coder", + }, + ["deepseek/v4pro"] = { + __inherited_from = "openai", + api_key_name = "DEEPSEEK_API_KEY", + endpoint = "https://api.deepseek.com", + model = "deepseek-v4-pro", + }, + ["z.ai/glm-4.6"] = { + __inherited_from = "openai", + api_key_name = "Z_API_KEY", + endpoint = "https://api.z.ai/api/coding/paas/v4", + model = "glm-4.6", + }, + }, + behaviour = { + auto_suggestions = false, + enable_fastapply = false, + auto_set_highlight_group = true, + auto_set_keymaps = true, + auto_apply_diff_after_generation = false, + support_paste_from_clipboard = false, + minimize_diff = true, -- Whether to remove unchanged lines when applying a code block + enable_token_counting = true, -- Whether to enable token counting. Default to true. + auto_add_current_file = true, -- Whether to automatically add the current file when opening a new chat. Default to true. + auto_approve_tool_permissions = false, + -- Examples: + -- auto_approve_tool_permissions = false, -- Show permission prompts for all tools + -- auto_approve_tool_permissions = {"bash", "str_replace"}, -- Auto-approve specific tools only + ---@type "popup" | "inline_buttons" + confirmation_ui_style = "inline_buttons", + --- Whether to automatically open files and navigate to lines when ACP agent makes edits + ---@type boolean + acp_follow_agent_locations = true, + }, + windows = {}, + acp_providers = {}, + rules = {}, + }, + dependencies = { + "nvim-lua/plenary.nvim", + "stevearc/dressing.nvim", -- for input provider dressing + "folke/snacks.nvim", -- for input provider snacks + "MunifTanjim/nui.nvim", + { + "MeanderingProgrammer/render-markdown.nvim", + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/colorscheme.lua b/.config/nvim/lua/plugins/colorscheme.lua index fd4a584..8394a72 100644 --- a/.config/nvim/lua/plugins/colorscheme.lua +++ b/.config/nvim/lua/plugins/colorscheme.lua @@ -12,6 +12,29 @@ -- }, -- } +-- Local development: +-- return { +-- dir = "/home/chodak/src/git/nvim-hybrid-theme", +-- name = "hybrid-theme", +-- lazy = false, +-- priority = 1000, +-- config = function() +-- require("hybrid-theme").setup({ +-- theme = "dark", +-- transparent = false, +-- background_variant = "flat", +-- italics = { +-- comments = true, +-- keywords = false, +-- functions = false, +-- strings = false, +-- variables = false, +-- }, +-- }) +-- require("hybrid-theme").colorscheme() +-- end, +-- } + return { { "chodak166/nvim-hybrid-theme", diff --git a/.config/nvim/lua/plugins/dotenv.lua b/.config/nvim/lua/plugins/dotenv.lua new file mode 100644 index 0000000..cbd0c35 --- /dev/null +++ b/.config/nvim/lua/plugins/dotenv.lua @@ -0,0 +1,9 @@ +return { + { + "ellisonleao/dotenv.nvim", + lazy = false, -- Load immediately + opts = { + file_name = "~/.config/nvim/.env", + }, + }, +} diff --git a/.config/nvim/lua/plugins/indent-blankline.lua b/.config/nvim/lua/plugins/indent-blankline.lua new file mode 100644 index 0000000..942e5f9 --- /dev/null +++ b/.config/nvim/lua/plugins/indent-blankline.lua @@ -0,0 +1,27 @@ +return { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + opts = { + indent = { + highlight = { + "IblIndent", + "IblIndent1", + "IblIndent2", + "IblIndent3", + "IblIndent4", + "IblIndent5", + "IblIndent6", + }, + }, + scope = { enabled = false }, + }, +} + +-- return { +-- "lukas-reineke/indent-blankline.nvim", +-- main = "ibl", +-- opts = { +-- scope = { enabled = false }, +-- -- indent.highlight removed → defaults to {"IblIndent"} +-- }, +-- } diff --git a/.config/nvim/lua/plugins/zz_disabled.lua b/.config/nvim/lua/plugins/zz_disabled.lua new file mode 100644 index 0000000..53a93fb --- /dev/null +++ b/.config/nvim/lua/plugins/zz_disabled.lua @@ -0,0 +1,10 @@ +-- NOTE: this file is not being tracked by default. +-- To add more plugins disabled by default, +-- tell Git to stop ignoring local changes: +-- config update-index --no-skip-worktree .config/nvim/lua/plugins/zz_disabled.lua +-- skip again: +-- config update-index --skip-worktree .config/nvim/lua/plugins/zz_disabled.lua + +return { + { "yetone/avante.nvim", enabled = false }, +} diff --git a/.dotfiles.d/init/init-dotfiles.sh b/.dotfiles.d/init/init-dotfiles.sh index e437321..d69ebf1 100755 --- a/.dotfiles.d/init/init-dotfiles.sh +++ b/.dotfiles.d/init/init-dotfiles.sh @@ -5,4 +5,5 @@ git clone --separate-git-dir=$HOME/.dotfiles.git http://git.nixlab.in/chodak166/ rm -r ~/dotfiles-tmp/ alias config='/usr/bin/git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME' config config status.showUntrackedFiles no +config update-index --skip-worktree .config/nvim/lua/plugins/zz_disabled.lua 2>/dev/null config checkout . diff --git a/.dotfiles.d/init/init-nvim.sh b/.dotfiles.d/init/init-nvim.sh index 55a796f..ffdf1a3 100755 --- a/.dotfiles.d/init/init-nvim.sh +++ b/.dotfiles.d/init/init-nvim.sh @@ -9,11 +9,12 @@ sudo apt install -y \ ripgrep \ fd-find \ zoxide \ + build-essential \ just cd /tmp curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz -sudo rm -rf /opt/nvim-linux-x86_64 +sudo rm -rf /opt/nvim-linux-x86_64 2>/dev/null || : sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz rm nvim-linux-x86_64.tar.gz sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/bin/nvim diff --git a/.dotfiles.d/init/init-shell.sh b/.dotfiles.d/init/init-shell.sh index 2970fb6..17fe510 100755 --- a/.dotfiles.d/init/init-shell.sh +++ b/.dotfiles.d/init/init-shell.sh @@ -6,6 +6,8 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" #sudo apt update -y sudo apt install -y zsh eza unzip locales +sudo chsh -s $(which zsh) $USER + source "${SCRIPT_DIR}/ensure-locale.sh" cd ~ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a3aa4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.old +*.orig +*.bak