summaryrefslogtreecommitdiff
path: root/config/nvim
diff options
context:
space:
mode:
author2026-03-27 14:13:00 +0300
committer2026-03-27 14:13:00 +0300
commit3009f160980a3856a54ca387d8c714c35fd94d49 (patch)
treed0be23b6bd4e270b0ac33e6047ce808a6ad6da77 /config/nvim
parentAdded minimap nvim, dap configs, conf syntax(WIP) (diff)
downloaddotfiles-3009f160980a3856a54ca387d8c714c35fd94d49.tar.gz
dotfiles-3009f160980a3856a54ca387d8c714c35fd94d49.tar.bz2
dotfiles-3009f160980a3856a54ca387d8c714c35fd94d49.tar.xz
dotfiles-3009f160980a3856a54ca387d8c714c35fd94d49.zip
new version
Diffstat (limited to 'config/nvim')
-rw-r--r--config/nvim/ftdetect/conf.vim2
-rw-r--r--config/nvim/init.lua7
-rw-r--r--config/nvim/lazy-lock.json42
-rw-r--r--config/nvim/lua/lsp.lua22
-rw-r--r--config/nvim/lua/options.lua3
-rw-r--r--config/nvim/lua/plugins.lua3
-rw-r--r--config/nvim/lua/plugins/catppuccin.lua24
-rw-r--r--config/nvim/lua/plugins/claudecode.lua26
-rw-r--r--config/nvim/lua/plugins/conform.lua2
-rw-r--r--config/nvim/lua/plugins/dap.lua254
-rw-r--r--config/nvim/lua/plugins/lspconfig.lua17
-rw-r--r--config/nvim/lua/plugins/lspsaga.lua1
-rw-r--r--config/nvim/lua/plugins/lualine.lua1
-rw-r--r--config/nvim/lua/plugins/multicursor.lua1
-rw-r--r--config/nvim/lua/plugins/resize.lua1
-rw-r--r--config/nvim/lua/plugins/rest.lua65
-rw-r--r--config/nvim/lua/plugins/telescope.lua20
-rw-r--r--config/nvim/lua/plugins/tree.lua61
-rw-r--r--config/nvim/lua/plugins/treesitter.lua17
-rw-r--r--config/nvim/lua/theme/alabaster.lua45
-rw-r--r--config/nvim/lua/theme/colors.lua856
-rw-r--r--config/nvim/lua/theme/init.lua12
-rw-r--r--config/nvim/lua/theme/modifiers.lua16
-rw-r--r--config/nvim/syntax/conf.vim59
24 files changed, 361 insertions, 1196 deletions
diff --git a/config/nvim/ftdetect/conf.vim b/config/nvim/ftdetect/conf.vim
deleted file mode 100644
index cf940f0..0000000
--- a/config/nvim/ftdetect/conf.vim
+++ /dev/null
@@ -1,2 +0,0 @@
-" conf filetype detection
-autocmd BufRead,BufNewFile *.conf setfiletype conf
diff --git a/config/nvim/init.lua b/config/nvim/init.lua
index b68a053..be3b300 100644
--- a/config/nvim/init.lua
+++ b/config/nvim/init.lua
@@ -1,4 +1,10 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+-- Add luarocks path for rest.nvim dependencies (only if not already present)
+local home = os.getenv("HOME") or "/home/neonxp"
+local luarocks_additional = home .. "/.luarocks/share/lua/5.1/?.lua;" .. home .. "/.luarocks/share/lua/5.1/?/init.lua"
+if not package.path:find(luarocks_additional, 1, true) then
+ package.path = luarocks_additional .. ";" .. package.path
+end
-- {{{
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
@@ -35,4 +41,3 @@ require("keymaps")
require("commands")
require("autocommands")
require("lsp")
-require("theme")
diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json
index 78856fd..841dfa5 100644
--- a/config/nvim/lazy-lock.json
+++ b/config/nvim/lazy-lock.json
@@ -2,42 +2,42 @@
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
"apidocs.nvim": { "branch": "main", "commit": "40356c6948a651181f7c9ce91f6fb4048dc388ef" },
"auto-save.nvim": { "branch": "main", "commit": "61892d67acd5b7c845f5da4d780b26fcd7f63e34" },
- "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
- "claudecode.nvim": { "branch": "main", "commit": "aa9a5cebebdbfa449c1c5ff229ba5d98e66bafed" },
- "conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
+ "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
+ "catppuccin": { "branch": "main", "commit": "a7788416689dbefea659d9e9415c87926b0ba5d8" },
+ "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
- "gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" },
- "go.nvim": { "branch": "master", "commit": "421694ad11759ad22d5200cff6a8c69d223ade29" },
+ "gitsigns.nvim": { "branch": "main", "commit": "a462f416e2ce4744531c6256252dee99a7d34a83" },
+ "go.nvim": { "branch": "master", "commit": "51a6f3b19b59f6e8e5d8d06aa23704ff2b6ed6bd" },
"goerr-nvim": { "branch": "main", "commit": "d30ba1cab652e78dbf6a644eb4823be57e9af203" },
"goimpl.nvim": { "branch": "main", "commit": "a0c2d8cd1e37f0ae8c19dc954ced3c6ccdceed53" },
- "guihua.lua": { "branch": "master", "commit": "ef44ba40f12e56c1c9fa45967f2b4d142e4b97a0" },
+ "guihua.lua": { "branch": "master", "commit": "fdca486468a5d94676477917872767b5e67a2b4c" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
- "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
- "lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
+ "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
+ "lspsaga.nvim": { "branch": "main", "commit": "562d9724e3869ffd1801c572dd149cc9f8d0cc36" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
- "multicursor.nvim": { "branch": "1.0", "commit": "630dd29dd696bc977cb81d7dd2fa6bb280f60fc4" },
- "neogit": { "branch": "master", "commit": "2a47e1df95605b232fbdd5d369ab1bfaaf40fce4" },
+ "multicursor.nvim": { "branch": "1.0", "commit": "704b99f10a72cc05d370cfeb294ff83412a8ab55" },
+ "neogit": { "branch": "master", "commit": "b77156034f1d87aecb04fcf224d4759e3973f0f4" },
"neominimap.nvim": { "branch": "main", "commit": "6a9d8b0d2f2c0d9d7853b377fa225990cb24837a" },
- "nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
- "nvim-dap": { "branch": "master", "commit": "db321947bb289a2d4d76a32e76e4d2bd6103d7df" },
+ "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
+ "nvim-dap": { "branch": "master", "commit": "2a8799ad91a1495c6bdf753f9b2179b3ff0f5bba" },
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
- "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
- "nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
+ "nvim-dap-ui": { "branch": "master", "commit": "f5b6673f374626515401c5bc51b005f784a4f252" },
+ "nvim-lspconfig": { "branch": "master", "commit": "1a6d69206749a646ef28bfb39460610b14baff40" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
- "nvim-tree.lua": { "branch": "master", "commit": "e11ce83ed9a00f065bf676ae4e6c261c766989ba" },
- "nvim-treesitter": { "branch": "main", "commit": "dc42c209f3820bdfaae0956f15de29689aa6b451" },
- "nvim-treesitter-context": { "branch": "master", "commit": "64dd4cf3f6fd0ab17622c5ce15c91fc539c3f24a" },
- "nvim-treesitter-textobjects": { "branch": "main", "commit": "a0e182ae21fda68c59d1f36c9ed45600aef50311" },
+ "nvim-tree.lua": { "branch": "master", "commit": "6eaf74c9919d121d2806ac3c20e757e66bd29c31" },
+ "nvim-treesitter": { "branch": "main", "commit": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849" },
+ "nvim-treesitter-context": { "branch": "master", "commit": "adf4b6b0420b7be6c717ef0ac7993183d6c201b1" },
+ "nvim-treesitter-textobjects": { "branch": "main", "commit": "93d60a475f0b08a8eceb99255863977d3a25f310" },
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
- "nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
+ "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"region-folding.nvim": { "branch": "master", "commit": "949a3348c51a1c0e08c098b5d2537f3efe53030f" },
+ "rest.nvim": { "branch": "main", "commit": "714d5512aaec5565d55652480c16c26f8d95645d" },
"smartcolumn.nvim": { "branch": "main", "commit": "b9cdbdf42f7ac5a659204cd5926017c7ff724a19" },
- "snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
"wrapping.nvim": { "branch": "master", "commit": "6cdc793511ccccee2ddd5322d640a17b7b255504" },
- "zk-nvim": { "branch": "main", "commit": "51c8f858420112dda495a6f4ddbd3943ae433e39" }
+ "zk-nvim": { "branch": "main", "commit": "dea1ee6cd6d07568c92ea8353063d4d85c58a964" }
}
diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua
index 91f22a1..45b7037 100644
--- a/config/nvim/lua/lsp.lua
+++ b/config/nvim/lua/lsp.lua
@@ -1,5 +1,3 @@
-local util = require("lspconfig/util")
-
local function config(_config)
local capabilities = vim.lsp.protocol.make_client_capabilities()
@@ -37,8 +35,28 @@ vim.lsp.config("templ", {
filetypes = { "templ" },
root_markers = { "go.work", "go.mod", ".git" },
})
+
+-- Try to find json-lsp (installed via json-lsp or vscode-json-languageserver)
+local jsonlsp_bin = vim.fn.executable("json-lsp") == 1 and "json-lsp"
+ or vim.fn.executable("vscode-json-languageserver") == 1 and "vscode-json-languageserver"
+ or nil
+
+if jsonlsp_bin then
+ vim.lsp.config("jsonls", {
+ cmd = { jsonlsp_bin, "--stdio" },
+ filetypes = { "json", "jsonc" },
+ root_markers = { ".git", "package.json", "tsconfig.json" },
+ })
+end
+
vim.lsp.enable("gopls")
vim.lsp.enable("templ")
+if jsonlsp_bin then
+ vim.lsp.enable("jsonls")
+end
+if vim.fn.executable("yaml-language-server") == 1 then
+ vim.lsp.enable("yamlls")
+end
-- require('lspconfig').v_analyzer.setup(config({
-- cmd = { "v-analyzer" },
diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua
index 1801c5c..c7d8362 100644
--- a/config/nvim/lua/options.lua
+++ b/config/nvim/lua/options.lua
@@ -41,8 +41,7 @@ local options = {
foldmethod = "expr",
foldexpr = "v:lua.vim.treesitter.foldexpr()",
foldnestmax = 10,
- -- foldlevel = 9,
- foldlevel = 4,
+ foldlevel = 9,
scrolloff = 999,
so = vim.fn.floor(vim.fn.winheight(0) / 2),
guicursor = "n-v-c:block,i-ci-ve:hor10,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175",
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua
index 2118756..5460a8b 100644
--- a/config/nvim/lua/plugins.lua
+++ b/config/nvim/lua/plugins.lua
@@ -21,11 +21,12 @@ require("lazy").setup({
require("plugins.telescope"),
require("plugins.columns"),
require("plugins.gitsigns"),
- require("plugins.claudecode"),
require("plugins.zk"),
require("plugins.wrapping"),
require("plugins.folding"),
require("plugins.minimap"),
+ require("plugins.rest"),
+ require("plugins.catppuccin"),
}, {
performance = {
rtp = {
diff --git a/config/nvim/lua/plugins/catppuccin.lua b/config/nvim/lua/plugins/catppuccin.lua
new file mode 100644
index 0000000..4387c11
--- /dev/null
+++ b/config/nvim/lua/plugins/catppuccin.lua
@@ -0,0 +1,24 @@
+return {
+ {
+ "catppuccin/nvim",
+ name = "catppuccin",
+ lazy = false,
+ priority = 1000,
+ config = function()
+ require("catppuccin").setup({
+ flavour = "mocha",
+ integrations = {
+ telescope = true,
+ treesitter = true,
+ lsp_saga = true,
+ lualine = true,
+ nvimtree = true,
+ dap = true,
+ dap_ui = true,
+ },
+ })
+ vim.cmd("colorscheme catppuccin")
+ end,
+ },
+}
+
diff --git a/config/nvim/lua/plugins/claudecode.lua b/config/nvim/lua/plugins/claudecode.lua
deleted file mode 100644
index 8533480..0000000
--- a/config/nvim/lua/plugins/claudecode.lua
+++ /dev/null
@@ -1,26 +0,0 @@
-return {
- "coder/claudecode.nvim",
- dependencies = { "folke/snacks.nvim" },
- opts = {},
- keys = {
- { "<leader>a", nil, desc = "AI/Claude Code" }, -- top‑level prefix
- { "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" }, -- open/close Claude:contentReference[oaicite:6]{index=6}
- { "<leader>af", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" }, -- focus/toggle terminal:contentReference[oaicite:7]{index=7}
- { "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" }, -- resume previous session:contentReference[oaicite:8]{index=8}
- { "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" }, -- continue conversation:contentReference[oaicite:9]{index=9}
- { "<leader>am", "<cmd>ClaudeCodeSelectModel<cr>", desc = "Select model" }, -- choose Claude model:contentReference[oaicite:10]{index=10}
- { "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" }, -- add current file:contentReference[oaicite:11]{index=11}
- -- Visual-mode send: use the mapping only in visual mode (mode = "v")
- { "<leader>as", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send selection" }, -- :contentReference[oaicite:12]{index=12}
- -- File-tree send: applies only in file manager buffers such as nvim‑tree or neo-tree:contentReference[oaicite:13]{index=13}
- {
- "<leader>as",
- "<cmd>ClaudeCodeTreeAdd<cr>",
- desc = "Add file",
- ft = { "NvimTree", "neo-tree", "oil", "minifiles", "netrw" },
- },
- -- Diff management: accept or deny changes:contentReference[oaicite:14]{index=14}
- { "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
- { "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
- },
-}
diff --git a/config/nvim/lua/plugins/conform.lua b/config/nvim/lua/plugins/conform.lua
index e08f54a..16bb4f7 100644
--- a/config/nvim/lua/plugins/conform.lua
+++ b/config/nvim/lua/plugins/conform.lua
@@ -22,4 +22,4 @@ return {
timeout_ms = 500,
},
},
-} \ No newline at end of file
+}
diff --git a/config/nvim/lua/plugins/dap.lua b/config/nvim/lua/plugins/dap.lua
index 6a17265..95cb891 100644
--- a/config/nvim/lua/plugins/dap.lua
+++ b/config/nvim/lua/plugins/dap.lua
@@ -1,125 +1,174 @@
return {
{
"mfussenegger/nvim-dap",
+ event = "VeryLazy",
+ dependencies = {
+ "leoluz/nvim-dap-go",
+ },
config = function()
local dap = require("dap")
- dap.adapters.go = {
- type = "server",
- port = "${port}",
- executable = {
- command = "dlv",
- args = { "dap", "-l", "127.0.0.1:${port}" },
- },
- }
- -- Хранение истории аргументов для каждой точки входа
- local _args_history = {}
-
- -- Функция для запроса аргументов у пользователя с историей (возвращает строку для парсинга)
- local function get_args(entry_point)
- local cache_key = entry_point
- local default = _args_history[cache_key] or ""
- local prompt = "Arguments for " .. entry_point .. ": "
- local input = vim.fn.input(prompt, default)
- if input and #input > 0 then
- _args_history[cache_key] = input
+ -- Find project root (where go.mod is)
+ local function find_project_root()
+ local current = vim.fn.getcwd()
+ local function find_go_mod(dir)
+ if vim.fn.filereadable(dir .. "/go.mod") == 1 then
+ return dir
+ end
+ local parent = vim.fn.fnamemodify(dir, ":h")
+ if parent == dir or parent == "" then
+ return nil
+ end
+ return find_go_mod(parent)
end
- return _args_history[cache_key]
+ return find_go_mod(current)
end
- -- Генерация конфигураций для Go на основе точек входа
- local function generate_go_configs()
- local workspace_folder = vim.fn.getcwd()
+ -- Find all main.go files in project
+ local function find_main_files(root)
+ -- Use vim glob to find main.go files (excludes vendor)
+ local pattern = root .. "/**/main.go"
+ local files = vim.fn.glob(pattern, true, true)
- -- Проверка существования .env файла в корне проекта
- local env_file = nil
- if vim.fn.filereadable(workspace_folder .. "/.env") == 1 then
- env_file = "${workspaceFolder}/.env"
+ -- Filter out vendor
+ local main_files = {}
+ for _, f in ipairs(files) do
+ if not string.match(f, "/vendor/") then
+ table.insert(main_files, f)
+ end
end
+ return main_files
+ end
- local configs = {}
- local entry_points = {}
+ -- Store last args per main file
+ local last_args = {}
- -- Поиск точки входа: main.go в корне или cmd/*/main.go
- if vim.fn.filereadable(workspace_folder .. "/main.go") == 1 then
- table.insert(entry_points, {
- name = "main",
- path = "${workspaceFolder}",
- })
+ -- Custom debug function with Telescope picker
+ local function debug_go_custom()
+ local root = find_project_root()
+ if not root then
+ vim.notify("Could not find project root (go.mod)", vim.log.levels.ERROR)
+ return
end
- -- Поиск cmd/*/main.go
- local cmd_dirs = vim.fn.glob(workspace_folder .. "/cmd/*", 0, 1)
- for _, cmd_dir in ipairs(cmd_dirs) do
- local main_path = cmd_dir .. "/main.go"
- if vim.fn.filereadable(main_path) == 1 then
- local entry_name = vim.fn.fnamemodify(cmd_dir, ":t")
- table.insert(entry_points, {
- name = entry_name,
- path = cmd_dir,
- })
- end
+ local main_files = find_main_files(root)
+ if #main_files == 0 then
+ vim.notify("No main.go files found", vim.log.levels.WARN)
+ return
end
- -- Генерация конфигураций для каждой точки входа
- for _, entry in ipairs(entry_points) do
- -- Базовая конфигурация без аргументов
- table.insert(configs, {
- type = "go",
- name = "Debug " .. entry.name,
- request = "launch",
- program = entry.path,
- cwd = "${workspaceFolder}",
- envFile = env_file,
- buildFlags = "",
- outputMode = "remote",
- })
+ -- Use Telescope to pick
+ local telescope = require("telescope")
+ local actions = require("telescope.actions")
+ local pickers = require("telescope.pickers")
+ local finders = require("telescope.finders")
+ local conf = require("telescope.config").values
- -- Конфигурация с аргументами (функция для запроса при запуске)
- table.insert(configs, {
- type = "go",
- name = "Debug " .. entry.name .. " (args)",
- request = "launch",
- program = entry.path,
- cwd = "${workspaceFolder}",
- envFile = env_file,
- buildFlags = "",
- outputMode = "remote",
- args = function()
- local args_str = get_args(entry.name)
- -- Разбиваем строку аргументов на массив
- local args = {}
- for arg in args_str:gmatch("%S+") do
- table.insert(args, arg)
- end
- return args
- end,
- })
+ -- Format: relative path + last args
+ local entries = {}
+ for _, f in ipairs(main_files) do
+ local rel = vim.fn.fnamemodify(f, ":.")
+ local args = last_args[f] or ""
+ table.insert(entries, { path = f, display = rel .. (args ~= "" and (" [" .. args .. "]") or "") })
end
- -- Remote attach конфигурация для подключения к уже запущенному delve
- table.insert(configs, {
- type = "go",
- name = "Remote attach (127.0.0.1:43000)",
- request = "attach",
- mode = "remote",
- port = "43000",
- host = "127.0.0.1",
- })
+ pickers.new({}, {
+ prompt_title = "Select main.go",
+ finder = finders.new_table({
+ results = entries,
+ entry_maker = function(entry)
+ return {
+ value = entry.path,
+ display = entry.display,
+ ordinal = entry.display,
+ }
+ end,
+ }),
+ sorter = conf.generic_sorter({}),
+ attach_mappings = function(prompt_bufnr)
+ actions.select_default:replace(function()
+ local selection = require("telescope.actions.state").get_selected_entry(prompt_bufnr)
+ local main_path = selection.value
+
+ -- Get last args or empty
+ local default_args = last_args[main_path] or ""
+
+ vim.api.nvim_buf_delete(prompt_bufnr, { force = true })
+
+ -- Ask for args
+ vim.ui.input({
+ prompt = "Args: ",
+ default = default_args,
+ }, function(input)
+ if input ~= nil then
+ -- Save args
+ last_args[main_path] = input
- return configs
+ -- Parse args into table
+ local args_tbl = {}
+ if input ~= "" then
+ for w in string.gmatch(input, "[^%s]+") do
+ table.insert(args_tbl, w)
+ end
+ end
+
+ -- Build config
+ local config = {
+ type = "go",
+ name = "Debug: " .. vim.fn.fnamemodify(main_path, ":t"),
+ request = "launch",
+ program = main_path,
+ cwd = root,
+ outputMode = "remote",
+ args = args_tbl,
+ }
+
+ -- Check if already running
+ require("dap-go").setup() -- Ensure Go adapter is registered
+ if dap.session() then
+ dap.terminate(nil, nil, function()
+ dap.run(config)
+ end)
+ else
+ dap.run(config)
+ end
+ end
+ end)
+ end)
+ return true
+ end,
+ }):find()
end
- -- Установка конфигураций Go
- dap.configurations.go = generate_go_configs()
+ -- Go adapter configuration
+ dap.configurations.go = {
+ {
+ type = "go",
+ name = "Debug",
+ request = "launch",
+ program = "${file}",
+ outputMode = "remote",
+ },
+ {
+ type = "go",
+ name = "Debug test",
+ request = "launch",
+ mode = "test",
+ program = "${file}",
+ outputMode = "remote",
+ },
+ {
+ type = "go",
+ name = "Debug test (package)",
+ request = "launch",
+ mode = "test",
+ program = "${workspaceFolder}",
+ outputMode = "remote",
+ },
+ }
- -- Автообновление конфигураций при открытии Go файла
- vim.api.nvim_create_autocmd("BufReadPost", {
- pattern = "*.go",
- callback = function()
- dap.configurations.go = generate_go_configs()
- end,
- })
+ -- Register custom command
+ vim.api.nvim_create_user_command("DapGoCustom", debug_go_custom, {})
end,
keys = {
{
@@ -165,6 +214,13 @@ return {
desc = "Debug step out",
},
{
+ "<leader>dd",
+ function()
+ vim.cmd("DapGoCustom")
+ end,
+ desc = "Debug Go (custom)",
+ },
+ {
"<A-b>",
function()
require("dap").toggle_breakpoint()
@@ -183,6 +239,7 @@ return {
},
{
"rcarriga/nvim-dap-ui",
+ event = "VeryLazy",
dependencies = {
"mfussenegger/nvim-dap",
"nvim-neotest/nvim-nio",
@@ -264,7 +321,6 @@ return {
"leoluz/nvim-dap-go",
dependencies = { "mfussenegger/nvim-dap" },
ft = "go",
- -- Не используем автоconfig - конфигурации управляются в nvim-dap
keys = {
{
"<leader>dt",
diff --git a/config/nvim/lua/plugins/lspconfig.lua b/config/nvim/lua/plugins/lspconfig.lua
index 59085f9..54b0ee9 100644
--- a/config/nvim/lua/plugins/lspconfig.lua
+++ b/config/nvim/lua/plugins/lspconfig.lua
@@ -1,30 +1,29 @@
return {
"neovim/nvim-lspconfig",
- dependencies = { "saghen/blink.cmp" },
keys = {
{
"d[",
- vim.diagnostic.goto_prev,
+ function() vim.diagnostic.goto_prev() end,
desc = "Previous diagnostic",
},
{
"d]",
- vim.diagnostic.goto_next,
+ function() vim.diagnostic.goto_next() end,
desc = "Next diagnostic",
},
{
"gD",
- vim.lsp.buf.declaration,
+ function() vim.lsp.buf.declaration() end,
desc = "Go to declaration",
},
{
"gd",
- vim.lsp.buf.definition,
+ function() vim.lsp.buf.definition() end,
desc = "Go to definition",
},
{
"K",
- vim.lsp.buf.hover,
+ function() vim.lsp.buf.hover() end,
desc = "Show documentation",
},
{
@@ -34,17 +33,17 @@ return {
},
{
"<F2>",
- vim.lsp.buf.rename,
+ function() vim.lsp.buf.rename() end,
desc = "Rename symbol",
},
{
"<leader>wa",
- vim.lsp.buf.add_workspace_folder,
+ function() vim.lsp.buf.add_workspace_folder() end,
desc = "Add workspace folder",
},
{
"<leader>wr",
- vim.lsp.buf.remove_workspace_folder,
+ function() vim.lsp.buf.remove_workspace_folder() end,
desc = "Remove workspace folder",
},
{
diff --git a/config/nvim/lua/plugins/lspsaga.lua b/config/nvim/lua/plugins/lspsaga.lua
index 546c073..c27d61c 100644
--- a/config/nvim/lua/plugins/lspsaga.lua
+++ b/config/nvim/lua/plugins/lspsaga.lua
@@ -1,5 +1,6 @@
return {
"nvimdev/lspsaga.nvim",
+ event = "VeryLazy",
dependencies = {
"nvim-treesitter/nvim-treesitter", -- optional
"nvim-tree/nvim-web-devicons", -- optional
diff --git a/config/nvim/lua/plugins/lualine.lua b/config/nvim/lua/plugins/lualine.lua
index bb1842a..ba9f15c 100644
--- a/config/nvim/lua/plugins/lualine.lua
+++ b/config/nvim/lua/plugins/lualine.lua
@@ -1,4 +1,3 @@
-local colors = require("theme.colors")
return {
"nvim-lualine/lualine.nvim",
opts = {
diff --git a/config/nvim/lua/plugins/multicursor.lua b/config/nvim/lua/plugins/multicursor.lua
index 0a762a8..a5a847b 100644
--- a/config/nvim/lua/plugins/multicursor.lua
+++ b/config/nvim/lua/plugins/multicursor.lua
@@ -1,6 +1,7 @@
return {
"jake-stewart/multicursor.nvim",
branch = "1.0",
+ event = "VeryLazy",
config = function()
local mc = require("multicursor-nvim")
mc.setup()
diff --git a/config/nvim/lua/plugins/resize.lua b/config/nvim/lua/plugins/resize.lua
index ea3ce0c..4c08aa7 100644
--- a/config/nvim/lua/plugins/resize.lua
+++ b/config/nvim/lua/plugins/resize.lua
@@ -1,6 +1,7 @@
return {
name = "resize",
dir = "~/.config/nvim/lua/myplugins",
+ event = "VeryLazy",
keys = {
{
"<C-A-Left>",
diff --git a/config/nvim/lua/plugins/rest.lua b/config/nvim/lua/plugins/rest.lua
new file mode 100644
index 0000000..f57b218
--- /dev/null
+++ b/config/nvim/lua/plugins/rest.lua
@@ -0,0 +1,65 @@
+return {
+ {
+ "rest-nvim/rest.nvim",
+ event = "VeryLazy",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "nvim-neotest/nvim-nio",
+ },
+ build = ":UpdateRemotePlugins",
+ config = function()
+ require("rest-nvim").setup({
+ -- Open request results in a horizontal split
+ split = {
+ horizontal = false, -- split horizontally
+ width = 0.4, -- split width, number represents percentage of screen
+ },
+ -- Skip SSL verification
+ skip_ssl_verification = false,
+ -- Encode URL characters
+ encode_url = true,
+ -- Highlight response
+ highlight = {
+ enabled = true,
+ timeout = 200,
+ },
+ -- Dynamic URL variable interpolation
+ dynamic_variables = {},
+ -- Default headers
+ default_headers = {
+ ["Content-Type"] = "application/json",
+ },
+ -- Custom curl arguments
+ curl_args = {
+ ["--max-time"] = 30,
+ },
+ -- Format response body using gq command
+ response = {
+ hooks = {
+ format = true,
+ },
+ },
+ })
+
+ -- Set formatprg for JSON formatting
+ vim.api.nvim_create_autocmd({ "FileType" }, {
+ pattern = "json",
+ callback = function(args)
+ vim.bo[args.buf].formatprg = "jq --indent 4"
+ end,
+ })
+ end,
+ keys = {
+ {
+ "<leader>rr",
+ ":Rest run<CR>",
+ desc = "Run HTTP request",
+ },
+ {
+ "<leader>rl",
+ ":Rest last<CR>",
+ desc = "Run HTTP request (last)",
+ },
+ },
+ },
+} \ No newline at end of file
diff --git a/config/nvim/lua/plugins/telescope.lua b/config/nvim/lua/plugins/telescope.lua
index e26a618..b1070c8 100644
--- a/config/nvim/lua/plugins/telescope.lua
+++ b/config/nvim/lua/plugins/telescope.lua
@@ -10,24 +10,24 @@ return {
},
keys = {
{
- "<leader>ff",
- "<cmd>Telescope find_files<CR>",
- desc = "Find files",
+ "<leader>fb",
+ "<cmd>Telescope buffers<CR>",
+ desc = "Find buffers",
},
{
- "<leader>fg",
+ "<F1>",
"<cmd>Telescope live_grep<CR>",
desc = "Live grep",
},
{
- "<leader>fb",
- "<cmd>Telescope current_buffer_fuzzy_find<CR>",
- desc = "Find in current buffer",
+ "<F3>",
+ "<cmd>Telescope find_files<CR>",
+ desc = "Find files",
},
{
- "<F4>",
- "<cmd>Telescope buffers<CR>",
- desc = "Find buffers",
+ "<leader>ff",
+ "<cmd>Telescope current_buffer_fuzzy_find<CR>",
+ desc = "Find in current buffer",
},
{
"<leader>gc",
diff --git a/config/nvim/lua/plugins/tree.lua b/config/nvim/lua/plugins/tree.lua
index 18f217b..08fed69 100644
--- a/config/nvim/lua/plugins/tree.lua
+++ b/config/nvim/lua/plugins/tree.lua
@@ -1,5 +1,5 @@
local HEIGHT_RATIO = 0.8
-local WIDTH_RATIO = 0.5
+local WIDTH_RATIO = 0.25
return {
"nvim-tree/nvim-tree.lua",
dependencies = {
@@ -33,37 +33,36 @@ return {
on_attach = function(bufnr)
local api = require("nvim-tree.api")
api.config.mappings.default_on_attach(bufnr)
- vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = vim.o.background == "dark" and "#1c1c1f" or "#e7e7e7" })
end,
view = {
- float = {
- enable = true,
- open_win_config = function()
- local screen_w = vim.opt.columns:get()
- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
- local window_w = screen_w * WIDTH_RATIO
- local window_h = screen_h * HEIGHT_RATIO
- local window_w_int = math.floor(window_w)
- local window_h_int = math.floor(window_h)
- local center_x = (screen_w - window_w) / 2
- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
- local border_bg = vim.o.background == "dark" and "#1c1c1f" or "#e7e7e7"
- local border_fg = vim.o.background == "dark" and "#333333" or "#999999"
- -- Force highlight for border and nvim-tree background
- vim.api.nvim_set_hl(0, "FloatBorder", { fg = border_fg, bg = border_bg })
- vim.api.nvim_set_hl(0, "NvimTreeFloatBorder", { fg = border_fg, bg = border_bg })
- vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = border_bg })
- vim.api.nvim_set_hl(0, "NormalFloat", { bg = border_bg })
- return {
- border = "rounded",
- relative = "editor",
- row = center_y,
- col = center_x,
- width = window_w_int,
- height = window_h_int,
- }
- end,
- },
+ -- float = {
+ -- enable = true,
+ -- open_win_config = function()
+ -- local screen_w = vim.opt.columns:get()
+ -- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
+ -- local window_w = screen_w * WIDTH_RATIO
+ -- local window_h = screen_h * HEIGHT_RATIO
+ -- local window_w_int = math.floor(window_w)
+ -- local window_h_int = math.floor(window_h)
+ -- local center_x = (screen_w - window_w) / 2
+ -- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
+ -- local border_bg = vim.o.background == "dark" and "#1c1c1f" or "#e7e7e7"
+ -- local border_fg = vim.o.background == "dark" and "#333333" or "#999999"
+ -- -- Force highlight for border and nvim-tree background
+ -- vim.api.nvim_set_hl(0, "FloatBorder", { fg = border_fg, bg = border_bg })
+ -- vim.api.nvim_set_hl(0, "NvimTreeFloatBorder", { fg = border_fg, bg = border_bg })
+ -- vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = border_bg })
+ -- vim.api.nvim_set_hl(0, "NormalFloat", { bg = border_bg })
+ -- return {
+ -- border = "rounded",
+ -- relative = "editor",
+ -- row = center_y,
+ -- col = center_x,
+ -- width = window_w_int,
+ -- height = window_h_int,
+ -- }
+ -- end,
+ -- },
width = function()
return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
end,
@@ -80,7 +79,7 @@ return {
desc = "Change tree root to CWD",
},
{
- "<F3>",
+ "<F4>",
"<cmd>NvimTreeToggle<CR>",
desc = "Toggle file tree",
},
diff --git a/config/nvim/lua/plugins/treesitter.lua b/config/nvim/lua/plugins/treesitter.lua
index a5ec534..2884f39 100644
--- a/config/nvim/lua/plugins/treesitter.lua
+++ b/config/nvim/lua/plugins/treesitter.lua
@@ -6,7 +6,21 @@ return {
enable = true,
additional_vim_regex_highlighting = false,
},
- ensure_installed = "all",
+ ensure_installed = {
+ "go",
+ "lua",
+ "javascript",
+ "typescript",
+ "json",
+ "yaml",
+ "python",
+ "bash",
+ "markdown",
+ "html",
+ "css",
+ "rust",
+ "templ",
+ },
ignore_install = { "gdhsader", "phpdoc", "org" },
indent = { enable = true },
auto_install = true,
@@ -35,7 +49,6 @@ return {
},
},
},
- build = ":TSUpdate",
dependencies = {
{ "nvim-treesitter/nvim-treesitter-textobjects" },
{
diff --git a/config/nvim/lua/theme/alabaster.lua b/config/nvim/lua/theme/alabaster.lua
deleted file mode 100644
index 7b7e34d..0000000
--- a/config/nvim/lua/theme/alabaster.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-local colors
-if vim.o.background == "dark" then
- colors = {
- color1 = "#162022",
- color2 = "#cd974b",
- color3 = "#cecece",
- color4 = "#9F9F9F",
- color5 = "#333333",
- color6 = "#cc8bc9",
- }
-else
- colors = {
- color1 = "#c9c9c9",
- color2 = "#cb9000",
- color3 = "#222222",
- color4 = "#666666",
- color5 = "#aaaaaa",
- color6 = "#7a3e9d",
- }
-end
-
-return {
- replace = {
- a = { fg = colors.color1, bg = nil, gui = "bold" },
- b = { fg = colors.color3, bg = nil },
- },
- inactive = {
- a = { fg = colors.color4, bg = nil, gui = "bold" },
- b = { fg = colors.color4, bg = nil },
- c = { fg = colors.color4, bg = nil },
- },
- normal = {
- a = { fg = colors.color3, bg = nil, gui = "bold" },
- b = { fg = colors.color3, bg = nil },
- c = { fg = colors.color3, bg = nil },
- },
- visual = {
- a = { fg = colors.color1, bg = nil, gui = "bold" },
- b = { fg = colors.color3, bg = nil },
- },
- insert = {
- a = { fg = colors.color1, bg = nil, gui = "bold" },
- b = { fg = colors.color3, bg = nil },
- },
-}
diff --git a/config/nvim/lua/theme/colors.lua b/config/nvim/lua/theme/colors.lua
deleted file mode 100644
index ca33eb3..0000000
--- a/config/nvim/lua/theme/colors.lua
+++ /dev/null
@@ -1,856 +0,0 @@
-vim.cmd("hi clear")
-if vim.fn.exists("syntax_on") == 1 then
- vim.cmd("syntax reset")
-end
-
-vim.g.colors_name = "alabaster"
-
-local theme
----@diagnostic disable: undefined-global
-if vim.o.background == "dark" then
- -- terminal colors
- vim.g.terminal_color_0 = "#000000"
- vim.g.terminal_color_1 = "#d2322d"
- vim.g.terminal_color_2 = "#6abf40"
- vim.g.terminal_color_3 = "#cd974b"
- vim.g.terminal_color_4 = "#217EBC"
- vim.g.terminal_color_5 = "#9B3596"
- vim.g.terminal_color_6 = "#178F79"
- vim.g.terminal_color_7 = "#cecece"
- vim.g.terminal_color_8 = "#333333"
- vim.g.terminal_color_9 = "#c33c33"
- vim.g.terminal_color_10 = "#95cb82"
- vim.g.terminal_color_11 = "#dfdf8e"
- vim.g.terminal_color_12 = "#71aed7"
- vim.g.terminal_color_13 = "#cc8bc9"
- vim.g.terminal_color_14 = "#47BEA9"
- vim.g.terminal_color_15 = "#ffffff"
-
- -- colors
- local bg = "#1c1c1f"
- local fg = "#cecece"
- local punct_fg = "#708b8d"
- local def_fg = "#71ade7"
- local const_fg = "#cc8bc9"
- local active = "#cd974b"
- local string_fg = "#95cb82"
- local darker_fg = "#7d7d7d"
- local diffadd = "#6abf40"
- local diffdelete = "#d2322d"
- local diffchange = "#ec8013"
- local statusline = "#2c3043"
- local comment = "#dfdf8e"
- local dim_comment = "#696969"
- local mistake = {
- fg = "#c33c33",
- bg = "#2b1d1e",
- }
- local error = "#d13e23"
- local warn = "#f4b371"
- local hint = "#8ebeec"
- local info = "#88cc66"
- local ansi = {
- black = "#333333",
- blue = "#71aed7",
- brightyellow = "#dfdf8e",
- cyan = "#47bea9",
- green = "#95cb82",
- magenta = "#cc8bc9",
- red = "#c33c33",
- white = "#cecece",
- yellow = "#cd974b",
- }
- local comment_fg = vim.g.alabaster_dim_comments and dim_comment or comment
- local pmenu_bg = "#252525"
- local float_bg = vim.g.alabaster_floatborder and bg or pmenu_bg
- local floatborder = vim.g.alabaster_floatborder and { bg = bg, fg = "#333333" }
- or {
- bg = float_bg,
- fg = float_bg,
- }
- theme = {
- Comment = { fg = comment_fg },
- ColorColumn = { bg = "#252525" },
- Conceal = { fg = "#b0b0b0" },
- Cursor = { bg = active, fg = "#000000" },
- -- lCursor { }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
- -- CursorIM { }, -- like Cursor, but used when in IME mode |CursorIM|
- CursorColumn = { bg = "#252525" },
- CursorLine = { bg = "#252525" },
- Directory = { fg = ansi.blue },
- DiffAdd = { bg = "#244032", fg = "#56d364" },
- DiffDelete = { bg = "#462c32", fg = "#f85149" },
- DiffText = { fg = "#341a00", bg = "#fff987" },
- DiffChange = { bg = "#341a00", fg = "#e3b341" },
- EndOfBuffer = { fg = "#354c50" },
- -- TermCursor { }, -- cursor in a focused terminal
- TermCursorNC = { fg = bg, bg = fg },
- ErrorMsg = { fg = error, bg = mistake.bg },
- VertSplit = { fg = "#2b3d40" },
- Folded = { bg = "#252525", fg = "#7d7d7d" },
- FoldColumn = { bg = bg, fg = "#4d4d4d" },
- SignColumn = {},
- IncSearch = { bg = ansi.yellow, fg = bg },
- -- Substitute { }, -- |:substitute| replacement text highlighting
- LineNr = { fg = "#5c5c5c" },
- CursorLineNr = { fg = ansi.blue, bold = 1 },
- MatchParen = { underline = 1, sp = active },
- -- ModeMsg { }, -- 'showmode' message (e.g., "-- INSERT -- ")
- -- MsgArea { }, -- Area for messages and cmdline
- -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
- MoreMsg = { fg = ansi.green, bold = 1 },
- NonText = { fg = "#696969" },
- Normal = { bg = bg, fg = fg },
- NormalFloat = { bg = float_bg },
- -- NormalNC { }, -- normal text in non-current windows
- FloatBorder = floatborder,
- Pmenu = { bg = pmenu_bg },
- PmenuSel = { bg = "#354c50" },
- PmenuSbar = { bg = "#212f31" },
- PmenuThumb = { bg = "#47666b" },
- Question = { fg = diffadd },
- QuickFixLine = { bg = "#252525" },
- Search = { bg = "#354c50" },
- SpecialKey = { fg = ansi.cyan },
- SpellBad = { undercurl = 1, sp = ansi.red },
- SpellCap = { undercurl = 1, sp = ansi.blue },
- SpellLocal = { undercurl = 1, sp = ansi.cyan },
- SpellRare = { undercurl = 1, sp = ansi.magenta },
- StatusLine = { bg = statusline, fg = fg },
- StatusLineNC = { bg = statusline, fg = "#9f9f9f" },
- TabLine = { bg = statusline, fg = "#7d7d7d" },
- TabLineFill = { bg = statusline },
- TabLineSel = { bg = statusline, fg = ansi.blue },
- Title = { fg = const_fg },
- Visual = { bg = "#293334" },
- VisualNOS = { bg = "#293334" },
- WarningMsg = { fg = "#e1ad4c" },
- WildMenu = { bg = "#354c50" },
- WinBar = { bg = bg, fg = ansi.white, bold = true },
- WinBarNC = { bg = bg, fg = "#7d7d7d" },
-
- --- SYNTAX I: TS groups link to these
- Constant = { fg = const_fg },
- String = { fg = string_fg },
- Character = { fg = const_fg },
- Number = { fg = const_fg },
- Boolean = { fg = const_fg },
- Float = { fg = const_fg },
- Operator = { fg = punct_fg },
-
- --- SYNTAX II: TS groups have their own definition, the below are defined to have somewhat working hl w/o treesitter
- Identifier = { fg = def_fg }, -- ansi.white },
- Function = { fg = def_fg },
- Statement = { fg = ansi.white },
- Conditional = { fg = ansi.white },
- Repeat = { fg = ansi.white },
- Label = { fg = def_fg },
- Keyword = { fg = ansi.white },
- Exception = { fg = ansi.white },
- PreProc = { fg = ansi.white },
- Include = { fg = ansi.white },
- Define = { fg = ansi.white },
- Macro = { fg = ansi.white },
- PreCondit = { fg = ansi.white },
- Type = { fg = ansi.white },
- StorageClass = { fg = ansi.white },
- Structure = { fg = def_fg },
- Typedef = { fg = def_fg },
-
- Special = { fg = ansi.yellow },
- -- TODO better color than diffchange, try reddish
- -- SpecialChar = { fg = diffchange }, -- special character in a constant
- -- Tag { }, -- you can use CTRL-] on this
- -- Delimiter { },
- SpecialComment = { bg = "#1d292b", fg = ansi.blue },
- debugPc = { bg = "#0f2534" },
- debugBreakpoint = { bg = "#b33229" },
- helpHyperTextJump = { fg = ansi.magenta },
- helpSectionDelim = { fg = ansi.magenta },
- helpExample = { fg = ansi.cyan },
- helpCommand = { fg = ansi.cyan },
- helpHeadline = { fg = ansi.blue },
- helpHeader = { fg = ansi.magenta },
-
- Underlined = { underline = 1 }, -- (preferred) text that stands out, HTML links
- Italic = { italic = 1 },
-
- -- ("Ignore", below, may be invisible...)
- -- Ignore { }, -- (preferred) left blank, hidden |hl-Ignore|
-
- Error = { bg = mistake.bg, fg = mistake.fg },
-
- Todo = { bg = "#d0d058", fg = bg },
-
- --- Diagnostic
- LspReferenceText = { bg = "#253437" },
- LspReferenceRead = { bg = "#253437" },
- LspReferenceWrite = { bg = "#253437", underline = 1, sp = active },
- LspCodeLens = { fg = "#5c5c5c" },
- LspCodeLensSeparator = { fg = "#5c5c5c" },
-
- --- Diagnostic
- DiagnosticError = { fg = error },
- DiagnosticWarn = { fg = warn },
- DiagnosticHint = { fg = hint },
- DiagnosticInfo = { fg = info },
- DiagnosticVirtualTextError = { bg = "#350B0B", fg = "#D1503A" },
- DiagnosticVirtualTextWarn = { bg = "#3F240A", fg = "#C8935D" },
- DiagnosticVirtualTextHint = { bg = "#1D2B37", fg = "#7E9CB9" },
- DiagnosticVirtualTextInfo = { bg = "#162C0B", fg = "#7BAC62" },
-
- --- Treesitter
- TSAttribute = {},
- TSConstructor = { fg = ansi.white },
- TSConditional = { fg = ansi.white },
- TSConstBuiltin = { fg = const_fg },
- TSConstMacro = { fg = ansi.white },
- TSError = { bg = mistake.bg, fg = mistake.fg },
- TSException = { fg = ansi.white },
- TSField = { fg = def_fg }, -- ansi.white },
- TSFunction = { fg = ansi.white },
- TSFuncBuiltin = { fg = ansi.white },
- TSFuncMacro = { fg = ansi.white },
- TSKeyword = { fg = ansi.white },
- TSKeywordFunction = { fg = ansi.white },
- TSLabel = { fg = ansi.white },
- TSMethod = { fg = ansi.white },
- TSNamespace = { fg = ansi.white },
- TSNone = { fg = const_fg },
- TSParameter = { fg = ansi.white },
- TSParameterReference = { fg = ansi.white },
- TSProperty = { fg = ansi.white },
- TSPunctDelimiter = { fg = punct_fg },
- TSPunctBracket = { fg = "#bababa" },
- TSPunctSpecial = { fg = punct_fg },
- TSRepeat = { fg = ansi.white },
- TSString = { fg = string_fg },
- TSStringRegex = { bg = "#1d292b", fg = const_fg },
- TSStringEscape = { bg = "#1d292b", fg = const_fg },
- TSSymbol = {},
- TSType = { fg = ansi.white },
- TSTypeBuiltin = { fg = ansi.white },
- TSVariable = { fg = ansi.white },
- TSVariableBuiltin = { fg = ansi.white },
- TSTag = { fg = ansi.white },
- TSTagDelimiter = { fg = punct_fg },
- TSText = { fg = ansi.white },
- ["@attribute"] = {},
- ["@constructor"] = { fg = ansi.white },
- ["@conditional"] = { fg = ansi.white },
- ["@constant.builtin"] = { fg = const_fg },
- ["@constant.macro"] = { fg = ansi.white },
- ["@error"] = { bg = mistake.bg, fg = mistake.fg },
- ["@exception"] = { fg = ansi.white },
- ["@field"] = { fg = ansi.white },
- ["@function"] = { fg = ansi.white },
- ["@function.builtin"] = { fg = ansi.white },
- ["@function.macro"] = { fg = ansi.white },
- ["@keyword"] = { fg = ansi.white },
- ["@keyword.function"] = { fg = ansi.white },
- ["@keyword.operator"] = { fg = punct_fg },
- ["@label"] = { fg = ansi.white },
- ["@method"] = { fg = ansi.white },
- ["@module"] = { fg = ansi.white },
- ["@namespace"] = { fg = ansi.white },
- ["@none"] = { fg = const_fg },
- ["@parameter"] = { fg = ansi.white },
- ["@parameter.reference"] = { fg = ansi.white },
- ["@property"] = { fg = ansi.white },
- ["@punctuation.delimiter"] = { fg = punct_fg },
- ["@punctuation.bracket"] = { fg = "#bababa" },
- ["@punctuation.special"] = { fg = punct_fg },
- ["@repeat"] = { fg = ansi.white },
- ["@string"] = { fg = string_fg },
- ["@string.regex"] = { bg = "#1d292b", fg = const_fg },
- ["@string.escape"] = { bg = "#1d292b", fg = const_fg },
- ["@symbol"] = {},
- ["@type.builtin"] = { fg = ansi.white },
- ["@variable"] = { fg = ansi.white },
- ["@variable.builtin"] = { fg = ansi.white },
- ["@tag"] = { fg = ansi.white },
- ["@tag.delimiter"] = { fg = punct_fg },
- ["@text"] = { fg = ansi.white },
- ["@text.note"] = { bg = "#1d292b", fg = ansi.blue },
- ["@text.warning"] = { bg = "#d0d058", fg = bg },
-
- ["@type"] = { fg = def_fg },
- ---
- --- Theme specific
- ["@AlabasterBase"] = { fg = ansi.white },
- ["@AlabasterConstant"] = { fg = const_fg },
- ["@AlabasterDefinition"] = { fg = def_fg },
- ["@AlabasterPunct"] = { fg = punct_fg },
- ["@AlabasterString"] = { fg = string_fg },
- ["@AlabasterHashbang"] = { fg = dim_comment },
- --- Gitsigns
- GitSignsAdd = { fg = diffadd },
- GitSignsChange = { fg = diffchange },
- GitSignsDelete = { fg = diffdelete },
- --- Telescope
- TelescopeBorder = { fg = "#2b3d40" },
- TelescopeMatching = { fg = "#f09942" },
- TelescopeMultiSelection = { fg = ansi.magenta },
- TelescopePromptPrefix = { fg = ansi.blue },
- TelescopeSelectionCaret = { fg = mistake.fg },
- TelescopeTitle = { fg = ansi.brightyellow },
- TelescopeResultsTitle = { fg = ansi.yellow },
- --- fzf-lua
- FzfLuaBorder = { fg = "#2b3d40" },
- --- mini.nvim
- MiniPickMatchCurrent = { fg = "#f09942" },
- --- Neogit
- NeogitPopupActionDisabled = { fg = darker_fg },
- NeogitPopupActionKey = { fg = ansi.magenta },
- NeogitPopupOptionDisabled = { fg = darker_fg },
- NeogitPopupOptionKey = { fg = ansi.blue },
- NeogitPopupSwitchDisabled = { fg = darker_fg },
- NeogitPopupSwitchEnabled = { fg = ansi.cyan },
- NeogitPopupSwitchKey = { fg = ansi.magenta },
- --- Fugitive
- diffAdded = { link = "DiffAdd" },
- diffRemoved = { link = "DiffDelete" },
- --- Startify
- StartifyBracket = { fg = darker_fg },
- StartifyFile = { fg = ansi.white },
- StartifySection = { fg = ansi.green },
- StartifySlash = { fg = "#4e6e75" },
- StartifyPath = { fg = "#4e6e75" },
- --- Statusline
- StatuslineAdd = { fg = diffadd, bg = statusline },
- StatuslineErr = { fg = error, bg = statusline },
- StatuslineHint = { fg = hint, bg = statusline },
- StatuslineInfo = { fg = info, bg = statusline },
- StatuslineWarn = { fg = warn, bg = statusline },
- StatuslineBlue = { fg = ansi.blue, bg = statusline },
- StatuslineRed = { fg = ansi.red, bg = statusline },
- StatuslineGreen = { fg = ansi.green, bg = statusline },
- StatuslineCyan = { fg = ansi.cyan, bg = statusline },
- StatuslineMagenta = { fg = ansi.magenta, bg = statusline },
- --- ALE
- ALEWarningSign = { fg = warn },
- --- vim-matchup
- MatchupVirtualText = { fg = ansi.yellow },
- --- For `highlight link`
- AlabasterBlack = { fg = ansi.black },
- AlabasterBlue = { fg = ansi.blue },
- AlabasterBrightYellow = { fg = ansi.brightyellow },
- AlabasterCyan = { fg = ansi.cyan },
- AlabasterGreen = { fg = ansi.green },
- AlabasterDarkGreen = { fg = "#6abf40" },
- AlabasterMagenta = { fg = ansi.magenta },
- AlabasterRed = { fg = ansi.red },
- AlabasterWhite = { fg = ansi.white },
- AlabasterYellow = { fg = ansi.yellow },
- --- Hop
- HopNextKey = { fg = ansi.brightyellow },
- HopNextKey1 = { fg = ansi.cyan },
- HopNextKey2 = { fg = "#297567" },
- HopUnmatched = { fg = "#3d3d3d" },
- --- Lightspeed
- LightspeedGreyWash = { fg = "#3d3d3d" },
- --- checkhealth
- healthSuccess = { fg = ansi.green, bg = bg },
- --- cmp
- CmpItemMenuDefault = { fg = ansi.magenta },
- --- nvim-ts-rainbow
- rainbowcol1 = { fg = ansi.yellow },
- rainbowcol2 = { fg = ansi.magenta },
- rainbowcol3 = { fg = ansi.blue },
- rainbowcol4 = { fg = ansi.green },
- rainbowcol5 = { fg = ansi.brightyellow },
- rainbowcol6 = { fg = ansi.red },
- rainbowcol7 = { fg = ansi.cyan },
- --- Iswap
- ISwapSnipe = { bg = ansi.yellow, fg = bg },
- ISwapGrey = { fg = "#3d3d3d" },
- --- vim-dadbod-ui
- dbui_help = { fg = dim_comment },
- dbui_connection_source = { fg = dim_comment },
- --- nvim-dap-virtual-text
- NvimDapVirtualText = { bg = "#1d292b", fg = ansi.cyan },
- --- nvim-tree
- NvimTreeNormal = { bg = "#1c1c1f" },
- NvimTreeNormalNC = { link = "NvimTreeNormal" },
- NvimTreeFloatBorder = { fg = "#333333" },
- NvimTreeWinSeparator = { fg = "#2b3d40" },
- NvimTreeCursorLine = { bg = "#252525" },
- NvimTreeFolderName = { fg = ansi.blue },
- NvimTreeFolderIcon = { fg = ansi.gold or "#cd974b" },
- NvimTreeOpenedFolderName = { fg = ansi.blue, bold = true },
- NvimTreeRootFolder = { fg = ansi.blue, bold = true },
- NvimTreeGitDirty = { fg = diffchange },
- NvimTreeGitStaged = { fg = diffadd },
- NvimTreeGitNew = { fg = ansi.green },
- NvimTreeGitDeleted = { fg = diffdelete },
- NvimTreeGitRenamed = { fg = ansi.magenta },
- NvimTreeExecFile = { fg = ansi.green },
- NvimTreeSpecialFile = { fg = ansi.yellow },
- NvimTreeIndentMarker = { fg = "#4d4d4d" },
- --- Noice
- NoiceCmdlineIcon = { link = "AlabasterDarkGreen" },
- NoiceCmdlinePopupBorder = { link = "AlabasterDarkGreen" },
- NoiceConfirmBorder = { link = "AlabasterDarkGreen" },
- NoiceCmdlinePopupBorderCmdline = { link = "AlabasterDarkGreen" },
- NoiceCmdlineIconCmdline = { link = "AlabasterDarkGreen" },
- NoiceCmdlinePopupBorderFilter = { link = "AlabasterDarkGreen" },
- NoiceCmdlineIconFilter = { link = "AlabasterDarkGreen" },
- NoiceCmdlinePopupBorderLua = { link = "AlabasterDarkGreen" },
- NoiceCmdlineIconLua = { link = "AlabasterDarkGreen" },
- NoiceCmdlinePopupBorderSearch = { link = "AlabasterYellow" },
- NoiceCmdlineIconSearch = { link = "AlabasterYellow" },
- -- Languages
- --- asm
- asmDirective = { fg = dim_comment },
- nasmLabel = { link = "@AlabasterDefinition" },
-
- ["@lsp.mod.declaration"] = { fg = fg },
- ["@lsp.type.enumMember"] = { fg = fg },
- ["@lsp.type.function"] = { fg = fg },
- ["@lsp.type.method"] = { fg = fg },
- ["@lsp.type.selfKeyword"] = { fg = fg },
- ["@lsp.typemod.class.declaration"] = { fg = def_fg },
- ["@lsp.typemod.class.definition"] = { fg = def_fg },
- ["@lsp.typemod.enum.declaration"] = { fg = def_fg },
- ["@lsp.typemod.enumMember.defaultLibrary"] = { fg = fg },
- ["@lsp.typemod.function.declaration"] = { fg = def_fg },
- ["@lsp.typemod.function.definition"] = { fg = def_fg },
- ["@lsp.typemod.macro.declaration"] = { fg = def_fg },
- ["@lsp.typemod.method.declaration"] = { fg = def_fg },
- ["@lsp.typemod.selfKeyword"] = { fg = fg },
- ["@lsp.typemod.struct.declaration"] = { fg = def_fg },
- ["@lsp.typemod.type.declaration"] = { fg = def_fg },
- }
-else
- -- terminal colors
- vim.g.terminal_color_0 = "#000000"
- vim.g.terminal_color_1 = "#aa3731"
- vim.g.terminal_color_2 = "#448c27"
- vim.g.terminal_color_3 = "#cb9000"
- vim.g.terminal_color_4 = "#325cc0"
- vim.g.terminal_color_5 = "#7a3e9d"
- vim.g.terminal_color_6 = "#0083b2"
- vim.g.terminal_color_7 = "#f7f7f7"
- vim.g.terminal_color_8 = "#777777"
- vim.g.terminal_color_9 = "#f05050"
- vim.g.terminal_color_10 = "#60cb00"
- vim.g.terminal_color_11 = "#ffbc5d"
- vim.g.terminal_color_12 = "#007acc"
- vim.g.terminal_color_13 = "#e64ce6"
- vim.g.terminal_color_14 = "#00aacb"
- vim.g.terminal_color_15 = "#f7f7f7"
-
- -- colors
- local bg = "#f7f7f7"
- local fg = "#000000"
- local punct_fg = "#777777"
- local def_fg = "#325cc0"
- local const_fg = "#7a3e9d"
- local active = "#ffbc5d"
- local active_blue = "#007acc"
- local string_fg = "#448c27"
- local darker_fg = "#7d7d7d"
- local diffadd = "#284918"
- local diffdelete = "#B40600"
- local diffchange = "#ec8013"
- local statusline = "#c9c9c9"
- local comment = "#aa3731"
- local dim_comment = "#696969"
- local mistake = {
- fg = "#c33c33",
- bg = "#f8b28f",
- }
- local ansi = {
- black = "#000000",
- blue = "#325cc0",
- brightyellow = "#ffbc5d",
- cyan = "#0083b2",
- green = "#448c27",
- magenta = "#7a3e9d",
- red = "#aa3731",
- white = "#f7f7f7",
- yellow = "#cb9000",
- }
- local error = "#d13e23"
- local warn = "#BC7500"
- local hint = ansi.blue
- local info = "#278C00"
- local comment_fg = vim.g.alabaster_dim_comments and dim_comment or comment
- local pmenu_bg = "#e7e7e7"
- local float_bg = bg -- vim.g.alabaster_floatborder and bg or pmenu_bg
- local floatborder = vim.g.alabaster_floatborder and { bg = bg, fg = "#999999" }
- or {
- bg = float_bg,
- fg = float_bg,
- }
- theme = {
- Comment = { fg = comment_fg },
- ColorColumn = { bg = "#E2EEEE" },
- Conceal = { fg = "#b0b0b0" },
- Cursor = { bg = "#007acc", fg = "#bfdbfe" },
- -- lCursor { }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
- -- CursorIM { }, -- like Cursor, but used when in IME mode |CursorIM|
- CursorColumn = { bg = "#E2EEEE" },
- CursorLine = { bg = "#E2EEEE" },
- Directory = { fg = ansi.blue },
- DiffAdd = { bg = "#ADFFB7", fg = "#0A7816" },
- DiffDelete = { bg = "#F8B28F", fg = "#872C28" },
- DiffText = { fg = "#fff987", bg = "#876004" },
- DiffChange = { bg = "#fff987", fg = "#341a00" },
- EndOfBuffer = { fg = "#b6b6b6" },
- -- TermCursor { }, -- cursor in a focused terminal
- TermCursorNC = { fg = bg, bg = fg },
- ErrorMsg = { fg = error, bg = mistake.bg },
- VertSplit = { fg = "#abbdc0" },
- Folded = { bg = "#dddddd", fg = "#7d7d7d" },
- FoldColumn = { bg = bg, fg = "#4d4d4d" },
-
- SignColumn = {},
- IncSearch = { bg = active, fg = fg },
- -- Substitute { }, -- |:substitute| replacement text highlighting
- LineNr = { fg = "#7d7c7c" },
- CursorLineNr = { fg = ansi.blue, bold = 1 },
- MatchParen = { underline = 1, sp = active },
- -- ModeMsg { }, -- 'showmode' message (e.g., "-- INSERT -- ")
- -- MsgArea { }, -- Area for messages and cmdline
- -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
- MoreMsg = { fg = ansi.green, bold = 1 },
- NonText = { fg = "#696969" },
- Normal = { bg = bg, fg = fg },
- NormalFloat = { bg = float_bg },
- -- NormalNC { }, -- normal text in non-current windows
- FloatBorder = floatborder,
- Pmenu = { bg = pmenu_bg },
- PmenuSel = { bg = "#c7c7c7" },
- PmenuSbar = { bg = "#777777" },
- PmenuThumb = { bg = "#333333" },
- Question = { fg = ansi.green },
- QuickFixLine = { bg = "#E2EEEE" },
- Search = { bg = "#fae9b7", fg = fg },
- SpecialKey = { fg = ansi.cyan },
- SpellBad = { undercurl = 1, sp = ansi.red },
- SpellCap = { undercurl = 1, sp = ansi.blue },
- SpellLocal = { undercurl = 1, sp = ansi.cyan },
- SpellRare = { undercurl = 1, sp = ansi.magenta },
- StatusLine = { bg = statusline, fg = fg },
- StatusLineNC = { bg = statusline, fg = "#9f9f9f" },
- TabLine = { bg = statusline, fg = "#7d7d7d" },
- TabLineFill = { bg = statusline },
- TabLineSel = { bg = statusline, fg = ansi.blue },
- Title = { fg = const_fg },
- Visual = { bg = "#bfdbfe" },
- VisualNOS = { bg = "#bfdbfe" },
- WarningMsg = { fg = "#e1ad4c" },
- WildMenu = { bg = "#999999" },
- WinBar = { bg = bg, fg = ansi.black, bold = true },
- WinBarNC = { bg = bg, fg = "#7d7d7d" },
-
- --- SYNTAX I: TS groups link to these
- Constant = { fg = const_fg },
- String = { fg = string_fg },
- Character = { fg = const_fg },
- Number = { fg = const_fg },
- Boolean = { fg = const_fg },
- Float = { fg = const_fg },
- Operator = { fg = punct_fg },
-
- --- SYNTAX II: TS groups have their own definition, the below are defined to have somewhat working hl w/o treesitter
- Identifier = { fg = ansi.black },
- Function = { fg = def_fg },
- Statement = { fg = ansi.black },
- Conditional = { fg = ansi.black },
- Repeat = { fg = ansi.black },
- Label = { fg = def_fg },
- Keyword = { fg = ansi.black },
- Exception = { fg = ansi.black },
- PreProc = { fg = ansi.black },
- Include = { fg = ansi.black },
- Define = { fg = ansi.black },
- Macro = { fg = ansi.black },
- PreCondit = { fg = ansi.black },
- Type = { fg = ansi.black },
- StorageClass = { fg = ansi.black },
- Structure = { fg = def_fg },
- Typedef = { fg = def_fg },
-
- Special = { fg = ansi.yellow },
- -- TODO better color than diffchange, try reddish
- -- SpecialChar = { fg = diffchange }, -- special character in a constant
- -- Tag { }, -- you can use CTRL-] on this
- -- Delimiter { },
- SpecialComment = { bg = "#FFDEAA", fg = ansi.blue },
- debugPc = { bg = "#C7C7EE" },
- debugBreakpoint = { bg = "#F8B28F" },
- helpHyperTextJump = { fg = ansi.magenta },
- helpSectionDelim = { fg = ansi.magenta },
- helpExample = { fg = ansi.cyan },
- helpCommand = { fg = ansi.cyan },
- helpHeadline = { fg = ansi.blue },
- helpHeader = { fg = ansi.magenta },
-
- Underlined = { underline = 1 }, -- (preferred) text that stands out, HTML links
- Italic = { italic = 1 },
-
- -- ("Ignore", below, may be invisible...)
- -- Ignore { }, -- (preferred) left blank, hidden |hl-Ignore|
-
- Error = { bg = mistake.bg, fg = mistake.fg },
-
- Todo = { bg = "#FFDEAA", fg = ansi.blue },
-
- --- Diagnostic
- LspReferenceText = { bg = "#dadada" },
- LspReferenceRdad = { bg = "#dadada" },
- LspReferenceWrite = { bg = "#dadada", underline = 1, sp = active_blue },
- LspCodeLens = { fg = "#999999" },
- LspCodeLensSeparator = { fg = "#999999" },
-
- --- Diagnostic
- DiagnosticError = { fg = error },
- DiagnosticWarn = { fg = warn },
- DiagnosticHint = { fg = hint },
- DiagnosticInfo = { fg = info },
- DiagnosticVirtualTextError = { bg = "#F8B28F", fg = "#411414" },
- DiagnosticVirtualTextWarn = { bg = "#fff987", fg = fg },
- DiagnosticVirtualTextHint = { fg = "#0F171D", bg = "#C3D0DA" },
- DiagnosticVirtualTextInfo = { bg = "#ADFFB7", fg = "#042F09" },
-
- --- Treesitter
- TSAttribute = {},
- TSConstructor = { fg = ansi.black },
- TSConditional = { fg = ansi.black },
- TSConstBuiltin = { fg = const_fg },
- TSConstMacro = { fg = ansi.black },
- TSError = { bg = mistake.bg, fg = mistake.fg },
- TSException = { fg = ansi.black },
- TSField = { fg = ansi.black },
- TSFunction = { fg = ansi.black },
- TSFuncBuiltin = { fg = ansi.black },
- TSFuncMacro = { fg = ansi.black },
- TSKeyword = { fg = ansi.black },
- TSKeywordFunction = { fg = ansi.black },
- TSLabel = { fg = ansi.black },
- TSMethod = { fg = ansi.black },
- TSNamespace = { fg = ansi.black },
- TSNone = { fg = const_fg },
- TSParameter = { fg = ansi.black },
- TSParameterReference = { fg = ansi.black },
- TSProperty = { fg = ansi.black },
- TSPunctDelimiter = { fg = punct_fg },
- TSPunctBracket = { fg = punct_fg },
- TSPunctSpecial = { fg = punct_fg },
- TSRepeat = { fg = ansi.black },
- TSString = { fg = string_fg },
- TSStringRegex = { bg = bg, fg = "#777777" },
- TSStringEscape = { bg = bg, fg = "#777777" },
- TSSymbol = {},
- TSType = { fg = ansi.black },
- TSTypeBuiltin = { fg = ansi.black },
- TSVariable = { fg = ansi.black },
- TSVariableBuiltin = { fg = ansi.black },
- TSTag = { fg = ansi.black },
- TSTagDelimiter = { fg = punct_fg },
- TSText = { fg = ansi.black },
-
- ["@attribute"] = {},
- ["@constructor"] = { fg = ansi.black },
- ["@conditional"] = { fg = ansi.black },
- ["@constant.builtin"] = { fg = const_fg },
- ["@constant.macro"] = { fg = ansi.black },
- ["@error"] = { bg = mistake.bg, fg = mistake.fg },
- ["@exception"] = { fg = ansi.black },
- ["@field"] = { fg = ansi.black },
- ["@function"] = { fg = ansi.black },
- ["@function.builtin"] = { fg = ansi.black },
- ["@function.macro"] = { fg = ansi.black },
- ["@keyword"] = { fg = ansi.black },
- ["@keyword.function"] = { fg = ansi.black },
- ["@label"] = { fg = ansi.black },
- ["@method"] = { fg = ansi.black },
- ["@module"] = { fg = ansi.black },
- ["@namespace"] = { fg = ansi.black },
- ["@none"] = { fg = const_fg },
- ["@parameter"] = { fg = ansi.black },
- ["@parameter.reference"] = { fg = ansi.black },
- ["@property"] = { fg = ansi.black },
- ["@punctuation.delimiter"] = { fg = punct_fg },
- ["@punctuation.bracket"] = { fg = punct_fg },
- ["@punctuation.special"] = { fg = punct_fg },
- ["@repeat"] = { fg = ansi.black },
- ["@string"] = { fg = string_fg },
- ["@string.regex"] = { bg = bg, fg = "#777777" },
- ["@string.escape"] = { bg = bg, fg = "#777777" },
- ["@symbol"] = {},
- ["@type"] = { fg = ansi.black },
- ["@type.builtin"] = { fg = ansi.black },
- ["@variable"] = { fg = ansi.black },
- ["@variable.builtin"] = { fg = ansi.black },
- ["@tag"] = { fg = ansi.black },
- ["@tag.delimiter"] = { fg = punct_fg },
- ["@text"] = { fg = ansi.black },
- ["@text.note"] = { bg = "#dddddd", fg = ansi.blue },
- ["@text.warning"] = { bg = "#FFDEAA", fg = ansi.blue },
-
- --- Theme specific
- ["@AlabasterConstant"] = { fg = const_fg },
- ["@AlabasterDefinition"] = { fg = def_fg },
- ["@AlabasterPunct"] = { fg = punct_fg },
- ["@AlabasterString"] = { fg = string_fg },
- ["@AlabasterHashbang"] = { fg = dim_comment },
- --- Gitsigns
- GitSignsAdd = { fg = "#6abf40" },
- GitSignsChange = { fg = diffchange },
- GitSignsDelete = { fg = diffdelete },
- --- Telescope
- TelescopeBorder = { fg = "#abbdc0" },
- TelescopeMatching = { fg = "#CC6F14" },
- TelescopeMultiSelection = { fg = ansi.magenta },
- TelescopePromptPrefix = { fg = ansi.blue },
- TelescopeSelectionCaret = { fg = mistake.fg },
- TelescopeTitle = { fg = ansi.yellow },
- TelescopeResultsTitle = { fg = ansi.yellow },
- --- fzf-lua
- FzfLuaBorder = { fg = "#abbdc0" },
- --- Neogit
- NeogitPopupActionDisabled = { fg = darker_fg },
- NeogitPopupActionKey = { fg = ansi.magenta },
- NeogitPopupOptionDisabled = { fg = darker_fg },
- NeogitPopupOptionKey = { fg = ansi.blue },
- NeogitPopupSwitchDisabled = { fg = darker_fg },
- NeogitPopupSwitchEnabled = { fg = ansi.cyan },
- NeogitPopupSwitchKey = { fg = ansi.magenta },
- --- Fugitive
- diffAdded = { link = "DiffAdd" },
- diffRemoved = { link = "DiffDelete" },
- --- Startify
- StartifyBracket = { fg = darker_fg },
- StartifyFile = { fg = ansi.black },
- StartifySection = { fg = ansi.green },
- StartifySlash = { fg = "#4e6e75" },
- StartifyPath = { fg = "#4e6e75" },
- --- Statusline
- StatuslineAdd = { fg = diffadd, bg = statusline },
- StatuslineErr = { fg = "#8E1410", bg = statusline },
- StatuslineHint = { fg = hint, bg = statusline },
- StatuslineInfo = { fg = info, bg = statusline },
- StatuslineWarn = { fg = warn, bg = statusline },
- StatuslineBlue = { fg = ansi.blue, bg = statusline },
- StatuslineRed = { fg = ansi.red, bg = statusline },
- StatuslineGreen = { fg = ansi.green, bg = statusline },
- StatuslineCyan = { fg = ansi.cyan, bg = statusline },
- StatuslineMagenta = { fg = ansi.magenta, bg = statusline },
- --- ALE
- ALEWarningSign = { fg = warn },
- --- vim-matchup
- MatchupVirtualText = { fg = ansi.yellow },
- --- For `highlight link`
- AlabasterBlack = { fg = ansi.black },
- AlabasterBlue = { fg = ansi.blue },
- AlabasterBrightYellow = { fg = ansi.brightyellow },
- AlabasterCyan = { fg = ansi.cyan },
- AlabasterGreen = { fg = ansi.green },
- AlabasterBrightGreen = { fg = "#60cb00" },
- AlabasterMagenta = { fg = ansi.magenta },
- AlabasterRed = { fg = ansi.red },
- AlabasterWhite = { fg = ansi.black },
- AlabasterYellow = { fg = ansi.yellow },
- --- Hop
- HopNextKey = { fg = ansi.yellow },
- HopNextKey1 = { fg = ansi.blue },
- HopNextKey2 = { fg = "#17A2D6" },
- HopUnmatched = { fg = "#bfbfbf" },
- --- Lightspeed
- LightspeedGreyWash = { fg = "#bfbfbf" },
- --- checkhealth
- healthSuccess = { fg = ansi.green, bg = bg },
- --- cmp
- CmpItemMenuDefault = { fg = ansi.magenta },
- --- nvim-ts-rainbow
- rainbowcol1 = { fg = ansi.yellow },
- rainbowcol2 = { fg = ansi.magenta },
- rainbowcol3 = { fg = ansi.blue },
- rainbowcol4 = { fg = ansi.green },
- rainbowcol5 = { fg = ansi.brightyellow },
- rainbowcol6 = { fg = ansi.red },
- rainbowcol7 = { fg = ansi.cyan },
- --- Iswap
- ISwapSnipe = { bg = ansi.yellow, fg = bg },
- ISwapGrey = { fg = "#bfbfbf" },
- --- vim-dadbod-ui
- dbui_help = { fg = dim_comment },
- dbui_connection_source = { fg = dim_comment },
- --- nvim-dap-virtual-text
- NvimDapVirtualText = { bg = "#78D2C9", fg = fg },
- --- nvim-tree
- NvimTreeNormal = { bg = "#e7e7e7" },
- NvimTreeNormalNC = { link = "NvimTreeNormal" },
- NvimTreeFloatBorder = { fg = "#999999" },
- NvimTreeWinSeparator = { fg = "#abbdc0" },
- NvimTreeCursorLine = { bg = "#E2EEEE" },
- NvimTreeFolderName = { fg = ansi.blue },
- NvimTreeFolderIcon = { fg = "#cb9000" },
- NvimTreeOpenedFolderName = { fg = ansi.blue, bold = true },
- NvimTreeRootFolder = { fg = ansi.blue, bold = true },
- NvimTreeGitDirty = { fg = diffchange },
- NvimTreeGitStaged = { fg = "#6abf40" },
- NvimTreeGitNew = { fg = ansi.green },
- NvimTreeGitDeleted = { fg = diffdelete },
- NvimTreeGitRenamed = { fg = ansi.magenta },
- NvimTreeExecFile = { fg = ansi.green },
- NvimTreeSpecialFile = { fg = ansi.yellow },
- NvimTreeIndentMarker = { fg = "#999999" },
- --- Noice
- NoiceCmdlineIcon = { link = "AlabasterBrightGreen" },
- NoiceCmdlinePopupBorder = { link = "AlabasterBrightGreen" },
- NoiceConfirmBorder = { link = "AlabasterBrightGreen" },
- NoiceCmdlinePopupBorderCmdline = { link = "AlabasterBrightGreen" },
- NoiceCmdlineIconCmdline = { link = "AlabasterBrightGreen" },
- NoiceCmdlinePopupBorderFilter = { link = "AlabasterBrightGreen" },
- NoiceCmdlineIconFilter = { link = "AlabasterBrightGreen" },
- NoiceCmdlinePopupBorderLua = { link = "AlabasterBrightGreen" },
- NoiceCmdlineIconLua = { link = "AlabasterBrightGreen" },
- NoiceCmdlinePopupBorderSearch = { link = "AlabasterYellow" },
- NoiceCmdlineIconSearch = { link = "AlabasterYellow" },
- -- Languages
- --- asm
- asmDirective = { fg = dim_comment },
- nasmLabel = { link = "@AlabasterDefinition" },
- ["@lsp.mod.declaration"] = { fg = fg },
- ["@lsp.type.enumMember"] = { fg = fg },
- ["@lsp.type.function"] = { fg = fg },
- ["@lsp.type.method"] = { fg = fg },
- ["@lsp.type.selfKeyword"] = { fg = fg },
- ["@lsp.typemod.class.declaration"] = { fg = def_fg },
- ["@lsp.typemod.class.definition"] = { fg = def_fg },
- ["@lsp.typemod.enum.declaration"] = { fg = def_fg },
- ["@lsp.typemod.enumMember.defaultLibrary"] = { fg = fg },
- ["@lsp.typemod.function.declaration"] = { fg = def_fg },
- ["@lsp.typemod.function.definition"] = { fg = def_fg },
- ["@lsp.typemod.macro.declaration"] = { fg = def_fg },
- ["@lsp.typemod.method.declaration"] = { fg = def_fg },
- ["@lsp.typemod.selfKeyword"] = { fg = fg },
- ["@lsp.typemod.struct.declaration"] = { fg = def_fg },
- ["@lsp.typemod.type.declaration"] = { fg = def_fg },
- }
-end
-
-for group, hl in pairs(theme) do
- vim.api.nvim_set_hl(0, group, hl)
-end
-
--- Ensure float border is always visible
-vim.api.nvim_create_autocmd("ColorScheme", {
- pattern = "*",
- callback = function()
- local border_bg = vim.o.background == "dark" and "#1c1c1f" or "#e7e7e7"
- local border_fg = vim.o.background == "dark" and "#333333" or "#999999"
- vim.api.nvim_set_hl(0, "FloatBorder", { fg = border_fg, bg = border_bg })
- end,
-})
-
--- Also set it immediately on load
-local border_fg = vim.o.background == "dark" and "#333333" or "#999999"
-local border_bg = vim.o.background == "dark" and "#1c1c1f" or "#e7e7e7"
-vim.api.nvim_set_hl(0, "FloatBorder", { fg = border_fg, bg = border_bg })
-
--- vi:nowrap
diff --git a/config/nvim/lua/theme/init.lua b/config/nvim/lua/theme/init.lua
deleted file mode 100644
index 719ec6b..0000000
--- a/config/nvim/lua/theme/init.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local M = {}
-
-M.setup = function()
- -- Set this BEFORE loading colorscheme
- if vim.g.alabaster_floatborder ~= true then
- vim.g.alabaster_floatborder = true
- vim.cmd("redraw!")
- end
- vim.cmd("colorscheme alabaster")
-end
-
-return M
diff --git a/config/nvim/lua/theme/modifiers.lua b/config/nvim/lua/theme/modifiers.lua
deleted file mode 100644
index 5f5b853..0000000
--- a/config/nvim/lua/theme/modifiers.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-local mods = {
-
- bold = {"bold", "bold"},
- italic = {"italic", "italic"},
- underline = {"underline", "underline"},
- underdouble = {"underdouble", "underdouble"},
- underdoted = {"underdoted", "underdoted"},
- underdashed = {"underdashed", "underdashed"},
- undercurl = {"undercurl", "undercurl"},
- reverse = {"reverse", "reverse"},
- standout = {"standout", "standout"},
- altfont = {"altfont", "altfont"},
- strikethrough = {"strikethrough", "strikethrough"},
- none = {"NONE", "NONE"}
-}
-return mods
diff --git a/config/nvim/syntax/conf.vim b/config/nvim/syntax/conf.vim
deleted file mode 100644
index 9efb07b..0000000
--- a/config/nvim/syntax/conf.vim
+++ /dev/null
@@ -1,59 +0,0 @@
-" Vim syntax file for conf configuration language
-" Language: conf
-" Maintainer: NeonXP <i@neonxp.ru>
-" Latest Revision: 2025-02-23
-
-if exists("b:current_syntax")
- finish
-endif
-
-syn keyword confBoolean true false
-syn keyword confTodo contained TODO FIXME XXX NOTE
-
-" Comments
-syn match confComment "#.*$" contains=confTodo
-
-" Variables (environment variables starting with $)
-syn match confVariable '\$\h\w*'
-
-" Strings
-syn region confString start='"' end='"' skip='\\"'
-syn region confString start="'" end="'" skip="\\'"
-syn region confMultilineString start='`' end='`' skip='\\`'
-
-" Numbers
-syn match confNumber '\d\+'
-syn match confNumber '-\d\+'
-syn match confFloat '\d\+\.\d\+'
-syn match confFloat '-\d\+\.\d\+'
-
-" Operators
-syn match confOperator "=\ze\s*"
-syn match confSemiColon ";"
-
-" Brackets
-syn match confBraces "[{}\[\]]"
-
-" Directives (words followed by arguments and/or block)
-syn match confDirective '^\s*\h\w*\ze\s*[{;]' contained
-syn match confDirective '^\s*\h\w*\ze\s*\S' contained
-
-" Keys (word followed by =)
-syn match confKey '^\s*\h\w*\ze\s*='
-
-" Define syntax groups
-hi def link confComment Comment
-hi def link confTodo Todo
-hi def link confVariable Identifier
-hi def link confString String
-hi def link confMultilineString String
-hi def link confNumber Number
-hi def link confFloat Float
-hi def link confBoolean Boolean
-hi def link confOperator Operator
-hi def link confSemiColon Special
-hi def link confBraces Special
-hi def link confKey Identifier
-hi def link confDirective Function
-
-let b:current_syntax = "conf"