Обновления конфигов
This commit is contained in:
parent
e9a2f811b7
commit
49e5fa5710
20 changed files with 529 additions and 192 deletions
|
@ -28,6 +28,8 @@ Thumbs.db
|
||||||
# Ides
|
# Ides
|
||||||
.Idea
|
.Idea
|
||||||
|
|
||||||
|
Session.vim
|
||||||
|
|
||||||
go.work
|
go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
|
|
||||||
|
|
142
nvim/colors/neonxp.lua
Normal file
142
nvim/colors/neonxp.lua
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
local function SetHl(group, mod, fg, bg)
|
||||||
|
|
||||||
|
local fmt="highlight %s gui=%s cterm=%s guifg=%s ctermfg=%s guibg=%s ctermbg=%s"
|
||||||
|
vim.cmd(fmt:format(group, mod[1], mod[2], fg[1], fg[2], bg[1], bg[2]))
|
||||||
|
end
|
||||||
|
local colors = require("theme.colors")
|
||||||
|
local mods = require("theme.modifiers")
|
||||||
|
|
||||||
|
vim.cmd([[hi normal guibg=NONE ctermbg=NONE]])
|
||||||
|
|
||||||
|
-- VIM - INTERFACE
|
||||||
|
------------------
|
||||||
|
SetHl("StatusLine", mods["bold"], colors["none"], colors["black_l"])
|
||||||
|
SetHl("StatusLineNC", mods["none"], colors["none"], colors["black_l"])
|
||||||
|
SetHl("TabLineSel", mods["bold"], colors["none"], colors["black_l"])
|
||||||
|
SetHl("WinSeparator", mods["none"], colors["gray"], colors["none"])
|
||||||
|
SetHl("Pmenu", mods["none"], colors["none"], colors["black_l"])
|
||||||
|
SetHl("PmenuSel", mods["bold"], colors["none"], colors["black_l"])
|
||||||
|
SetHl("PmenuThumb", mods["none"], colors["none"], colors["gray_dd"])
|
||||||
|
SetHl("FloatBorder", mods["none"], colors["gray"], colors["none"])
|
||||||
|
|
||||||
|
-- VIM - GENERAL TEXT
|
||||||
|
---------------------
|
||||||
|
SetHl("Visual", mods["bold"], colors["none"], colors["black_l"])
|
||||||
|
SetHl("Normal", mods["none"], colors["white"], colors["none"])
|
||||||
|
SetHl("NormalFloat", mods["none"], colors["white"], colors["none"])
|
||||||
|
SetHl("NonText", mods["none"], colors["gray"], colors["none"])
|
||||||
|
SetHl("SpecialKey", mods["none"], colors["gray"], colors["none"])
|
||||||
|
SetHl("Conceal", mods["none"], colors["gray"], colors["none"])
|
||||||
|
SetHl("Folded", mods["none"], colors["none"], colors["none"])
|
||||||
|
SetHl("MatchParen", mods["bold"], colors["yellow_l"], colors["black_l"])
|
||||||
|
SetHl("Search", mods["bold"], colors["yellow_l"], colors["black_l"])
|
||||||
|
SetHl("CurSearch", mods["bold"], colors["chartreuse_l"], colors["black_l"])
|
||||||
|
SetHl("CursorLine", mods["bold"], colors["none"], colors["black_ll"])
|
||||||
|
SetHl("CursorColumn", mods["bold"], colors["none"], colors["black_l"])
|
||||||
|
SetHl("ColorColumn", mods["bold"], colors["none"], colors["black_ll"])
|
||||||
|
|
||||||
|
-- VIM - INFO TEXT
|
||||||
|
------------------
|
||||||
|
SetHl("LineNr", mods["italic"], colors["gray"], colors["none"])
|
||||||
|
SetHl("SignColumn", mods["bold"], colors["gray"], colors["none"])
|
||||||
|
SetHl("DiagnosticError", mods["none"], colors["red_l"], colors["none"])
|
||||||
|
SetHl("DiagnosticWarn", mods["none"], colors["orange_l"], colors["none"])
|
||||||
|
SetHl("DiagnosticOK", mods["none"], colors["green_l"], colors["none"])
|
||||||
|
SetHl("DiagnosticInfo", mods["none"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("DiffAdd", mods["none"], colors["green_l"], colors["black_l"])
|
||||||
|
SetHl("DiffChange", mods["none"], colors["orange_l"], colors["black_l"])
|
||||||
|
SetHl("DiffDelete", mods["none"], colors["red_l"], colors["black_l"])
|
||||||
|
SetHl("DiffText", mods["none"], colors["royal_l"], colors["black_l"])
|
||||||
|
SetHl("QuickFixLine", mods["none"], colors["royal_l"], colors["none"])
|
||||||
|
|
||||||
|
-- VIM - MESSAGE TEXT
|
||||||
|
---------------------
|
||||||
|
SetHl("ErrorMsg", mods["none"], colors["red_l"], colors["none"])
|
||||||
|
SetHl("WarningMsg", mods["none"], colors["orange_l"], colors["none"])
|
||||||
|
SetHl("Title", mods["bold"], colors["white"], colors["none"])
|
||||||
|
SetHl("ModeMsg", mods["none"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("MoreMsg", mods["none"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("Question", mods["none"], colors["royal_l"], colors["none"])
|
||||||
|
|
||||||
|
-- VIM - FILE SYSTEM
|
||||||
|
--------------------
|
||||||
|
SetHl("Directory", mods["none"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("netrwClassify", mods["none"], colors["royal_d"], colors["none"])
|
||||||
|
SetHl("netrwExe", mods["none"], colors["turquoise_l"], colors["none"])
|
||||||
|
|
||||||
|
-- CODE - VIM GENERAL
|
||||||
|
---------------------
|
||||||
|
SetHl("PreProc", mods["none"], colors["purple_l"], colors["none"])
|
||||||
|
SetHl("PreCondit", mods["none"], colors["purple_l"], colors["none"])
|
||||||
|
SetHl("Statement", mods["none"], colors["cyan_l"], colors["none"])
|
||||||
|
SetHl("Type", mods["none"], colors["green_l"], colors["none"])
|
||||||
|
SetHl("Identifier", mods["none"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("Function", mods["none"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("Delimiter", mods["none"], colors["gray_ll"], colors["none"])
|
||||||
|
SetHl("Operator", mods["none"], colors["white"], colors["none"])
|
||||||
|
SetHl("Constant", mods["none"], colors["white"], colors["none"])
|
||||||
|
SetHl("Special", mods["none"], colors["white_dd"], colors["none"])
|
||||||
|
SetHl("String", mods["italic"], colors["white"], colors["none"])
|
||||||
|
SetHl("Comment", mods["italic"], colors["gray"], colors["none"])
|
||||||
|
SetHl("SpecialComment", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("Todo", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("Debug", mods["italic"], colors["gray"], colors["none"])
|
||||||
|
SetHl("Error", mods["none"], colors["red_l"], colors["none"])
|
||||||
|
SetHl("Added", mods["none"], colors["green_l"], colors["none"])
|
||||||
|
SetHl("Changed", mods["none"], colors["orange_l"], colors["none"])
|
||||||
|
SetHl("Removed", mods["none"], colors["red_l"], colors["none"])
|
||||||
|
|
||||||
|
-- CODE - TREESITTER GENERAL
|
||||||
|
----------------------------
|
||||||
|
SetHl("@variable", mods["none"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("@constant", mods["none"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("@function.builtin", mods["none"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("@variable.builtin", mods["none"], colors["purple_l"], colors["none"])
|
||||||
|
SetHl("@constant.builtin", mods["none"], colors["purple_l"], colors["none"])
|
||||||
|
|
||||||
|
-- CODE - TREESITTER BASH
|
||||||
|
-------------------------
|
||||||
|
SetHl("@variable.parameter.bash", mods["none"], colors["turquoise_d"], colors["none"])
|
||||||
|
SetHl("@punctuation.special.bash", mods["none"], colors["royal_d"], colors["none"])
|
||||||
|
SetHl("@character.special.bash", mods["none"], colors["purple_l"], colors["none"])
|
||||||
|
|
||||||
|
-- ADDON - LAZY
|
||||||
|
---------------
|
||||||
|
SetHl("LazyH1", mods["bold"], colors["purple_l"], colors["none"])
|
||||||
|
SetHl("LazyH2", mods["bold"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("LazyComment", mods["none"], colors["turquoise_d"], colors["none"])
|
||||||
|
SetHl("LazyButton", mods["none"], colors["white"], colors["none"])
|
||||||
|
SetHl("LazyButtonActive", mods["none"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("LazySpecial", mods["bold"], colors["turquoise_l"], colors["none"])
|
||||||
|
|
||||||
|
-- ADDON - LSPCMP
|
||||||
|
-----------------
|
||||||
|
SetHl("CmpItemKind", mods["italic"], colors["gray_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindKeyword", mods["italic"], colors["cyan_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindClass", mods["italic"], colors["yellow_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindStruct", mods["italic"], colors["green_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindEnum", mods["italic"], colors["salmon_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindInterface", mods["italic"], colors["blue_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindField", mods["italic"], colors["green_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindUnit", mods["italic"], colors["salmon_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindFile", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindFunction", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindMethod", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindModule", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindConstructor", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindOperator", mods["italic"], colors["turquoise_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindFolder", mods["italic"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindConstant", mods["italic"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindVariable", mods["italic"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindReference", mods["italic"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindParameter", mods["italic"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindEnumMember", mods["italic"], colors["royal_l"], colors["none"])
|
||||||
|
SetHl("CmpItemKindSnippet", mods["italic"], colors["purple_l"], colors["none"])
|
||||||
|
|
||||||
|
-- ADDON - TELESCOPE
|
||||||
|
--------------------
|
||||||
|
SetHl("TelescopeTitle", mods["bold"], colors["white"], colors["none"])
|
||||||
|
SetHl("TelescopeBorder", mods["none"], colors["gray"], colors["none"])
|
||||||
|
SetHl("TelescopePromptPrefix", mods["none"], colors["purple_l"], colors["none"])
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
local out = vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"--branch=stable",
|
||||||
|
lazyrepo,
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
@ -23,6 +30,7 @@ vim.cmd("filetype plugin indent on")
|
||||||
require("options")
|
require("options")
|
||||||
require("plugins")
|
require("plugins")
|
||||||
require("keymaps")
|
require("keymaps")
|
||||||
|
require("commands")
|
||||||
require("autocommands")
|
require("autocommands")
|
||||||
require("lsp")
|
require("lsp")
|
||||||
require("dap")
|
require("dap")
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||||
"auto-save.nvim": { "branch": "main", "commit": "29f793a3a7f98129387590269ffe3ad61ab5e509" },
|
"auto-save.nvim": { "branch": "main", "commit": "29f793a3a7f98129387590269ffe3ad61ab5e509" },
|
||||||
|
"auto-session": { "branch": "main", "commit": "00334ee24b9a05001ad50221c8daffbeedaa0842" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "374aaf384e2e841607b8e2fe63fa3ad01d111c91" },
|
"conform.nvim": { "branch": "master", "commit": "2b2b30260203af3b93a7470ac6c8457ddd6e32d9" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"go.nvim": { "branch": "master", "commit": "37ec4d9be3edef64b725bfe29684e1fe019873bc" },
|
"go.nvim": { "branch": "master", "commit": "37ec4d9be3edef64b725bfe29684e1fe019873bc" },
|
||||||
"goimpl.nvim": { "branch": "main", "commit": "2548d42c4db0645dea14f27e67c4b19b7030f1cf" },
|
"goimpl.nvim": { "branch": "main", "commit": "2548d42c4db0645dea14f27e67c4b19b7030f1cf" },
|
||||||
|
@ -21,17 +22,17 @@
|
||||||
"nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" },
|
"nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" },
|
||||||
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
|
"nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" },
|
"nvim-lspconfig": { "branch": "master", "commit": "5a137448fd921a0c5d3939cb75e60d21f64e4606" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "e7d1b7dadc62fe2eccc17d814354b0a5688621ce" },
|
"nvim-tree.lua": { "branch": "master", "commit": "e7d1b7dadc62fe2eccc17d814354b0a5688621ce" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
|
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0e3be38005e9673d044e994b1e4b123adb040179" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "b0debd5c424969b4baeabdc8f54db3036c691732" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
|
"nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
|
||||||
"onedark.nvim": { "branch": "master", "commit": "11de4da47f3e69cb70c3ae9816bd8af166cbe121" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||||
"smartcolumn.nvim": { "branch": "main", "commit": "92f3773af80d674f1eb61e112dca79e2fa449fd1" },
|
"smartcolumn.nvim": { "branch": "main", "commit": "92f3773af80d674f1eb61e112dca79e2fa449fd1" },
|
||||||
|
"telescope-project.nvim": { "branch": "master", "commit": "8e11df94419e444601c09828dadf70890484e443" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,23 +88,24 @@ vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufAdd", "BufNew", "BufNewFile", "BufWinEnter" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufAdd", "BufNew", "BufNewFile", "BufWinEnter" }, {
|
||||||
group = vim.api.nvim_create_augroup("TS_FOLD_WORKAROUND", {}),
|
group = vim.api.nvim_create_augroup("TS_FOLD_WORKAROUND", {}),
|
||||||
callback = function()
|
callback = function()
|
||||||
|
vim.opt.foldlevelstart = 99
|
||||||
vim.opt.foldmethod = "expr"
|
vim.opt.foldmethod = "expr"
|
||||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
local buf = args.buf
|
local buf = args.buf
|
||||||
local ft = vim.bo[buf].filetype
|
local ft = vim.bo[buf].filetype
|
||||||
|
|
||||||
if ft and ft ~= "" then
|
if ft and ft ~= "" then
|
||||||
local has_parser, _ = pcall(vim.treesitter.language.get_lang, ft)
|
local has_parser, _ = pcall(vim.treesitter.language.get_lang, ft)
|
||||||
if has_parser then
|
if has_parser then
|
||||||
pcall(vim.treesitter.start, buf, ft)
|
pcall(vim.treesitter.start, buf, ft)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "TSUpdate",
|
pattern = "TSUpdate",
|
||||||
|
@ -181,5 +182,5 @@ vim.api.nvim_create_autocmd("VimResized", {
|
||||||
--
|
--
|
||||||
-- vim.api.nvim_create_autocmd("InsertLeave", {
|
-- vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
-- pattern = "*",
|
-- pattern = "*",
|
||||||
-- command = "set relativenumber",
|
-- callback = "set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz",
|
||||||
-- })
|
-- })
|
||||||
|
|
6
nvim/lua/commands.lua
Normal file
6
nvim/lua/commands.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
vim.api.nvim_create_user_command("Lower", function()
|
||||||
|
vim.cmd([[normal! guaw]])
|
||||||
|
end, { force = true })
|
||||||
|
vim.api.nvim_create_user_command("Upper", function()
|
||||||
|
vim.cmd([[normal! gUaw]])
|
||||||
|
end, { force = true })
|
|
@ -44,19 +44,13 @@ end
|
||||||
kmap("n", "<leader>tt", ":split<CR>:terminal<CR>:startinsert<CR>", { noremap = true, silent = true })
|
kmap("n", "<leader>tt", ":split<CR>:terminal<CR>:startinsert<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
-- {{{ LSP функции
|
-- {{{ LSP функции
|
||||||
kmap("n", "<leader>e", vim.diagnostic.open_float, { noremap = true, silent = true, desc = "Show diagnostics" })
|
|
||||||
|
|
||||||
kmap("n", "d[", vim.diagnostic.goto_prev, { noremap = true, silent = true, desc = "Previous diagnostic" })
|
kmap("n", "d[", vim.diagnostic.goto_prev, { noremap = true, silent = true, desc = "Previous diagnostic" })
|
||||||
kmap("n", "d]", vim.diagnostic.goto_next, { noremap = true, silent = true, desc = "Next diagnostic" })
|
kmap("n", "d]", vim.diagnostic.goto_next, { noremap = true, silent = true, desc = "Next diagnostic" })
|
||||||
|
|
||||||
kmap("n", "gD", vim.lsp.buf.declaration, { noremap = true, silent = true, desc = "Go to declaration" })
|
kmap("n", "gD", vim.lsp.buf.declaration, { noremap = true, silent = true, desc = "Go to declaration" })
|
||||||
kmap("n", "gd", vim.lsp.buf.definition, { noremap = true, silent = true, desc = "Go to definition" })
|
kmap("n", "gd", vim.lsp.buf.definition, { noremap = true, silent = true, desc = "Go to definition" })
|
||||||
kmap("n", "<leader>D", vim.lsp.buf.type_definition, { noremap = true, silent = true, desc = "Type definition" })
|
|
||||||
kmap("n", "gr", vim.lsp.buf.references, { noremap = true, silent = true, desc = "Find references" })
|
|
||||||
|
|
||||||
kmap("n", "K", vim.lsp.buf.hover, { noremap = true, silent = true, desc = "Show documentation" })
|
kmap("n", "K", vim.lsp.buf.hover, { noremap = true, silent = true, desc = "Show documentation" })
|
||||||
|
|
||||||
kmap("n", "gi", vim.lsp.buf.implementation, { noremap = true, silent = true, desc = "Go to implementation" })
|
|
||||||
kmap("n", "<C-k>", vim.lsp.buf.signature_help, { noremap = true, silent = true, desc = "Signature help" })
|
kmap("n", "<C-k>", vim.lsp.buf.signature_help, { noremap = true, silent = true, desc = "Signature help" })
|
||||||
|
|
||||||
kmap(
|
kmap(
|
||||||
|
|
128
nvim/lua/lualine/themes/base16.lua
Normal file
128
nvim/lua/lualine/themes/base16.lua
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
|
||||||
|
local modules = require('lualine_require').lazy_require { notices = 'lualine.utils.notices' }
|
||||||
|
|
||||||
|
local function add_notice(notice)
|
||||||
|
modules.notices.add_notice('theme(base16): ' .. notice)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function setup(colors)
|
||||||
|
local theme = {
|
||||||
|
normal = {
|
||||||
|
a = { fg = colors.bg, bg = colors.normal },
|
||||||
|
b = { fg = colors.light_fg, bg = colors.alt_bg },
|
||||||
|
c = { fg = colors.fg, bg = colors.bg },
|
||||||
|
},
|
||||||
|
replace = {
|
||||||
|
a = { fg = colors.bg, bg = colors.replace },
|
||||||
|
b = { fg = colors.light_fg, bg = colors.alt_bg },
|
||||||
|
},
|
||||||
|
insert = {
|
||||||
|
a = { fg = colors.bg, bg = colors.insert },
|
||||||
|
b = { fg = colors.light_fg, bg = colors.alt_bg },
|
||||||
|
},
|
||||||
|
visual = {
|
||||||
|
a = { fg = colors.bg, bg = colors.visual },
|
||||||
|
b = { fg = colors.light_fg, bg = colors.alt_bg },
|
||||||
|
},
|
||||||
|
inactive = {
|
||||||
|
a = { fg = colors.dark_fg, bg = colors.bg },
|
||||||
|
b = { fg = colors.dark_fg, bg = colors.bg },
|
||||||
|
c = { fg = colors.dark_fg, bg = colors.bg },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
theme.command = theme.normal
|
||||||
|
theme.terminal = theme.insert
|
||||||
|
|
||||||
|
return theme
|
||||||
|
end
|
||||||
|
|
||||||
|
local function setup_default()
|
||||||
|
return setup {
|
||||||
|
bg = '#282a2e',
|
||||||
|
alt_bg = '#373b41',
|
||||||
|
dark_fg = '#969896',
|
||||||
|
fg = '#b4b7b4',
|
||||||
|
light_fg = '#c5c8c6',
|
||||||
|
normal = '#81a2be',
|
||||||
|
insert = '#b5bd68',
|
||||||
|
visual = '#b294bb',
|
||||||
|
replace = '#de935f',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function setup_base16_nvim()
|
||||||
|
-- Continue to load nvim-base16
|
||||||
|
local loaded, base16 = pcall(require, 'base16-colorscheme')
|
||||||
|
|
||||||
|
if not loaded then
|
||||||
|
add_notice(
|
||||||
|
'nvim-base16 is not currently present in your runtimepath, make sure it is properly installed,'
|
||||||
|
.. ' fallback to default colors.'
|
||||||
|
)
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if not base16.colors and not vim.env.BASE16_THEME then
|
||||||
|
add_notice(
|
||||||
|
'nvim-base16 is not loaded yet, you should update your configuration to load it before lualine'
|
||||||
|
.. ' so that the colors from your colorscheme can be used, fallback to "tomorrow-night" theme.'
|
||||||
|
)
|
||||||
|
elseif not base16.colors and not base16.colorschemes[vim.env.BASE16_THEME] then
|
||||||
|
add_notice(
|
||||||
|
'The colorscheme "%s" defined by the environment variable "BASE16_THEME" is not handled by'
|
||||||
|
.. ' nvim-base16, fallback to "tomorrow-night" theme.'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
local colors = base16.colors or base16.colorschemes[vim.env.BASE16_THEME or 'tomorrow-night']
|
||||||
|
|
||||||
|
return setup {
|
||||||
|
bg = colors.base01,
|
||||||
|
alt_bg = colors.base02,
|
||||||
|
dark_fg = colors.base03,
|
||||||
|
fg = colors.base04,
|
||||||
|
light_fg = colors.base05,
|
||||||
|
normal = colors.base0D,
|
||||||
|
insert = colors.base0B,
|
||||||
|
visual = colors.base0E,
|
||||||
|
replace = colors.base09,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function setup_base16_vim()
|
||||||
|
-- Check if tinted-theming/base16-vim is already loaded
|
||||||
|
if vim.g.base16_gui00 and vim.g.base16_gui0F then
|
||||||
|
return setup {
|
||||||
|
bg = vim.g.base16_gui01,
|
||||||
|
alt_bg = vim.g.base16_gui02,
|
||||||
|
dark_fg = vim.g.base16_gui03,
|
||||||
|
fg = vim.g.base16_gui04,
|
||||||
|
light_fg = vim.g.base16_gui05,
|
||||||
|
normal = vim.g.base16_gui0D,
|
||||||
|
insert = vim.g.base16_gui0B,
|
||||||
|
visual = vim.g.base16_gui0E,
|
||||||
|
replace = vim.g.base16_gui09,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- base16-vim has been renamed to tinted-vim along with colors
|
||||||
|
-- context: https://github.com/nvim-lualine/lualine.nvim/pull/1352
|
||||||
|
if vim.g.tinted_gui00 and vim.g.tinted_gui0F then
|
||||||
|
return setup {
|
||||||
|
bg = vim.g.tinted_gui01,
|
||||||
|
alt_bg = vim.g.tinted_gui02,
|
||||||
|
dark_fg = vim.g.tinted_gui03,
|
||||||
|
fg = vim.g.tinted_gui04,
|
||||||
|
light_fg = vim.g.tinted_gui05,
|
||||||
|
normal = vim.g.tinted_gui0D,
|
||||||
|
insert = vim.g.tinted_gui0B,
|
||||||
|
visual = vim.g.tinted_gui0E,
|
||||||
|
replace = vim.g.tinted_gui09,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
return setup_base16_vim() or setup_base16_nvim() or setup_default()
|
|
@ -32,15 +32,11 @@ local options = {
|
||||||
scrolloff = 8,
|
scrolloff = 8,
|
||||||
sidescrolloff = 8,
|
sidescrolloff = 8,
|
||||||
syntax = "on",
|
syntax = "on",
|
||||||
foldmethod = "expr",
|
foldenable = false,
|
||||||
foldmarker = "{{{,}}}",
|
|
||||||
--foldexpr = "v:lua.vim.treesitter.foldexpr()",
|
|
||||||
foldexpr = "nvim_treesitter#foldexpr()",
|
|
||||||
foldlevelstart = 99,
|
|
||||||
foldenable = true,
|
|
||||||
scrolloff = 999,
|
scrolloff = 999,
|
||||||
so = vim.fn.floor(vim.fn.winheight(0) / 2),
|
so = vim.fn.floor(vim.fn.winheight(0) / 2),
|
||||||
guicursor = "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50,i:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175",
|
guicursor = "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50,i:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175",
|
||||||
|
langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯЖ;ABCDEFGHIJKLMNOPQRSTUVWXYZ:,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz",
|
||||||
}
|
}
|
||||||
vim.opt.formatoptions:append({ r = true, o = true })
|
vim.opt.formatoptions:append({ r = true, o = true })
|
||||||
vim.opt.shortmess:append("c")
|
vim.opt.shortmess:append("c")
|
||||||
|
@ -56,3 +52,5 @@ vim.filetype.add({
|
||||||
templ = "templ",
|
templ = "templ",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.cmd([[colorscheme neonxp]])
|
||||||
|
|
|
@ -5,7 +5,6 @@ require("lazy").setup({
|
||||||
build = "cd lua/fzy && make",
|
build = "cd lua/fzy && make",
|
||||||
},
|
},
|
||||||
{ "neovim/nvim-lspconfig" },
|
{ "neovim/nvim-lspconfig" },
|
||||||
-- { "Snyssfx/goerr-nvim" },
|
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
|
@ -33,7 +32,7 @@ require("lazy").setup({
|
||||||
current = "← ",
|
current = "← ",
|
||||||
below = "↖ ",
|
below = "↖ ",
|
||||||
},
|
},
|
||||||
floating_window = false,
|
floating_window = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -77,7 +76,6 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
require("plugins.autosave"),
|
require("plugins.autosave"),
|
||||||
require("plugins.theme"),
|
|
||||||
require("plugins.cmp"),
|
require("plugins.cmp"),
|
||||||
require("plugins.treesitter"),
|
require("plugins.treesitter"),
|
||||||
require("plugins.tree"),
|
require("plugins.tree"),
|
||||||
|
|
|
@ -21,59 +21,8 @@ local function setup_go_configuration(dap, configs)
|
||||||
type = "go",
|
type = "go",
|
||||||
name = "Debug",
|
name = "Debug",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
program = "${file}",
|
program = "${workspaceFolder}",
|
||||||
buildFlags = configs.delve.build_flags,
|
args = {},
|
||||||
outputMode = configs.delve.output_mode,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug (Arguments)",
|
|
||||||
request = "launch",
|
|
||||||
program = "${file}",
|
|
||||||
args = get_arguments,
|
|
||||||
buildFlags = configs.delve.build_flags,
|
|
||||||
outputMode = configs.delve.output_mode,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug (Arguments & Build Flags)",
|
|
||||||
request = "launch",
|
|
||||||
program = "${file}",
|
|
||||||
args = get_arguments,
|
|
||||||
buildFlags = get_build_flags,
|
|
||||||
outputMode = configs.delve.output_mode,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug Package",
|
|
||||||
request = "launch",
|
|
||||||
program = "${fileDirname}",
|
|
||||||
buildFlags = configs.delve.build_flags,
|
|
||||||
outputMode = configs.delve.output_mode,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Attach",
|
|
||||||
mode = "local",
|
|
||||||
request = "attach",
|
|
||||||
processId = filtered_pick_process,
|
|
||||||
buildFlags = configs.delve.build_flags,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug test",
|
|
||||||
request = "launch",
|
|
||||||
mode = "test",
|
|
||||||
program = "${file}",
|
|
||||||
buildFlags = configs.delve.build_flags,
|
|
||||||
outputMode = configs.delve.output_mode,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "go",
|
|
||||||
name = "Debug test (go.mod)",
|
|
||||||
request = "launch",
|
|
||||||
mode = "test",
|
|
||||||
program = "./${relativeFileDirname}",
|
|
||||||
buildFlags = configs.delve.build_flags,
|
buildFlags = configs.delve.build_flags,
|
||||||
outputMode = configs.delve.output_mode,
|
outputMode = configs.delve.output_mode,
|
||||||
},
|
},
|
||||||
|
@ -164,61 +113,40 @@ return {
|
||||||
silent = true,
|
silent = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<F10>",
|
"<F17>", -- S-F5
|
||||||
|
function()
|
||||||
|
require("dap").restart()
|
||||||
|
end,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<F29>", -- C-F5
|
||||||
|
function()
|
||||||
|
require("dap").terminate()
|
||||||
|
end,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<F8>",
|
||||||
function()
|
function()
|
||||||
require("dap").step_over()
|
require("dap").step_over()
|
||||||
end,
|
end,
|
||||||
silent = true,
|
silent = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<F11>",
|
"<F7>",
|
||||||
function()
|
function()
|
||||||
require("dap").step_into()
|
require("dap").step_into()
|
||||||
end,
|
end,
|
||||||
silent = true,
|
silent = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<F12>",
|
"<F19>", -- S-F7
|
||||||
function()
|
function()
|
||||||
require("dap").step_out()
|
require("dap").step_out()
|
||||||
end,
|
end,
|
||||||
silent = true,
|
silent = true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"<leader>dc",
|
|
||||||
function()
|
|
||||||
require("dap").continue()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>so",
|
|
||||||
function()
|
|
||||||
require("dap").step_over()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>si",
|
|
||||||
function()
|
|
||||||
require("dap").step_into()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>st",
|
|
||||||
function()
|
|
||||||
require("dap").step_out()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>b",
|
|
||||||
function()
|
|
||||||
require("dap").toggle_breakpoint()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"<A-b>",
|
"<A-b>",
|
||||||
function()
|
function()
|
||||||
|
@ -226,33 +154,5 @@ return {
|
||||||
end,
|
end,
|
||||||
silent = true,
|
silent = true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"<Leader>B",
|
|
||||||
function()
|
|
||||||
require("dap").set_breakpoint()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<Leader>lp",
|
|
||||||
function()
|
|
||||||
require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: "))
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<Leader>dr",
|
|
||||||
function()
|
|
||||||
require("dap").repl.open()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<Leader>dl",
|
|
||||||
function()
|
|
||||||
require("dap").run_last()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>du",
|
"<F6>",
|
||||||
function()
|
function()
|
||||||
require("dapui").toggle()
|
require("dapui").toggle()
|
||||||
end,
|
end,
|
||||||
|
@ -27,7 +27,7 @@ return {
|
||||||
silent = true,
|
silent = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<Leader>ds",
|
"<F9>",
|
||||||
function()
|
function()
|
||||||
local widgets = require("dap.ui.widgets")
|
local widgets = require("dap.ui.widgets")
|
||||||
widgets.centered_float(widgets.scopes)
|
widgets.centered_float(widgets.scopes)
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
local colors = require("theme.colors")
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = "onedark",
|
theme = "auto",
|
||||||
component_separators = { left = "", right = "" },
|
component_separators = { left = "", right = "" },
|
||||||
section_separators = { left = "", right = "" },
|
section_separators = { left = "", right = "" },
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
|
|
|
@ -1,19 +1,50 @@
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = {
|
||||||
opts = {
|
"nvim-lua/plenary.nvim",
|
||||||
pickers = {
|
|
||||||
buffers = {
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
defaults = {
|
|
||||||
file_ignore_patterns = { "vendor", "node_modules" },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
config = function()
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
require("telescope").setup({
|
||||||
|
extensions = {
|
||||||
|
project = {
|
||||||
|
sync_with_nvim_tree = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
buffers = {
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
file_ignore_patterns = { "vendor", "node_modules" },
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<F4>"] = actions.close,
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<F4>"] = actions.close,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ff", "<cmd>Telescope find_files<CR>", noremap = true, silent = true, desc = "Find files" },
|
{ "<leader>ff", "<cmd>Telescope find_files<CR>", noremap = true, silent = true, desc = "Find files" },
|
||||||
{ "<leader>fg", "<cmd>Telescope live_grep<CR>", noremap = true, silent = true, desc = "Live grep" },
|
{ "<leader>fg", "<cmd>Telescope live_grep<CR>", noremap = true, silent = true, desc = "Live grep" },
|
||||||
{ "<leader>fb", "<cmd>Telescope buffers<CR>", noremap = true, silent = true, desc = "Find buffers" },
|
{
|
||||||
|
"<leader>fb",
|
||||||
|
"<cmd>Telescope current_buffer_fuzzy_fund<CR>",
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
desc = "Find current file",
|
||||||
|
},
|
||||||
|
{ "<F4>", "<cmd>Telescope buffers<CR>", noremap = true, silent = true, desc = "Find buffers" },
|
||||||
|
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", noremap = true, silent = true },
|
||||||
|
{ "<leader>gs", "<cmd>Telescope git_status<CR>", noremap = true, silent = true },
|
||||||
|
{ "<leader>ch", "<cmd>Telescope commands_history<CR>", noremap = true, silent = true },
|
||||||
|
{ "<leader>e", "<cmd>Telescope diagnostics<CR>", noremap = true, silent = true },
|
||||||
|
{ "gi", "<cmd>Telescope lsp_implementations<CR>", noremap = true, silent = true },
|
||||||
|
{ "gr", "<cmd>Telescope lsp_references<CR>", noremap = true, silent = true },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
return {
|
|
||||||
"navarasu/onedark.nvim",
|
|
||||||
priority = 1000, -- make sure to load this before all the other start plugins
|
|
||||||
config = function()
|
|
||||||
require("onedark").setup({
|
|
||||||
style = "darker",
|
|
||||||
colors = {
|
|
||||||
bright_orange = "#ff8800", -- define a new color
|
|
||||||
},
|
|
||||||
highlights = {
|
|
||||||
-- ["@lsp.type.keyword"] = { fg = "$green", fmt = "bold,underline" },
|
|
||||||
-- ["@lsp.type.property"] = { fg = "$bright_orange", bg = "#00ff00", fmt = "bold" },
|
|
||||||
-- ["@lsp.type.function"] = { fg = "#0000ff", sp = "$cyan", fmt = "underline,italic" },
|
|
||||||
-- ["@lsp.type.method"] = { link = "@function" },
|
|
||||||
-- To add language specific config
|
|
||||||
-- ["@lsp.type.variable.go"] = { fg = "none" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("onedark").load()
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -1,18 +1,49 @@
|
||||||
|
local HEIGHT_RATIO = 0.8
|
||||||
|
local WIDTH_RATIO = 0.5
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
|
disable_netrw = true,
|
||||||
|
hijack_netrw = true,
|
||||||
hijack_directories = {
|
hijack_directories = {
|
||||||
enable = true, -- Перехватывать открытие директорий
|
enable = true,
|
||||||
auto_open = true, -- Автоматически открывать при старте
|
auto_open = true,
|
||||||
},
|
},
|
||||||
sort = {
|
sort = {
|
||||||
sorter = "case_sensitive",
|
sorter = "case_sensitive",
|
||||||
},
|
},
|
||||||
view = {
|
view = {
|
||||||
width = 30,
|
-- width = 30,
|
||||||
|
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()
|
||||||
|
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,
|
||||||
|
adaptive_size = true,
|
||||||
|
centralize_selection = true,
|
||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -29,9 +60,11 @@ return {
|
||||||
filters = {
|
filters = {
|
||||||
dotfiles = false,
|
dotfiles = false,
|
||||||
},
|
},
|
||||||
|
sync_root_with_cwd = true,
|
||||||
|
respect_buf_cwd = true,
|
||||||
update_focused_file = {
|
update_focused_file = {
|
||||||
enable = true,
|
enable = true,
|
||||||
update_root = false,
|
update_root = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
|
|
29
nvim/lua/theme/asset/hsv-to-rgb.lua
Normal file
29
nvim/lua/theme/asset/hsv-to-rgb.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
local function HsvToRgb(h, s, v)
|
||||||
|
|
||||||
|
s = s / 100.0
|
||||||
|
v = v / 100.0
|
||||||
|
h = h / 60.0
|
||||||
|
|
||||||
|
local i = math.floor(h) % 6
|
||||||
|
local f = h - math.floor(h)
|
||||||
|
local p = v * (1.0 - s)
|
||||||
|
local q = v * (1.0 - f * s)
|
||||||
|
local t = v * (1.0 - (1.0 - f) * s)
|
||||||
|
|
||||||
|
local r, g, b = 0, 0, 0
|
||||||
|
|
||||||
|
if i == 0 then r, g, b = v, t, p
|
||||||
|
elseif i == 1 then r, g, b = q, v, p
|
||||||
|
elseif i == 2 then r, g, b = p, v, t
|
||||||
|
elseif i == 3 then r, g, b = p, q, v
|
||||||
|
elseif i == 4 then r, g, b = t, p, v
|
||||||
|
else r, g, b = v, p, q
|
||||||
|
end
|
||||||
|
|
||||||
|
r = math.floor(r * 255 + 0.5)
|
||||||
|
g = math.floor(g * 255 + 0.5)
|
||||||
|
b = math.floor(b * 255 + 0.5)
|
||||||
|
|
||||||
|
return string.format("#%02x%02x%02x", r, g, b)
|
||||||
|
end
|
||||||
|
return HsvToRgb
|
68
nvim/lua/theme/colors.lua
Normal file
68
nvim/lua/theme/colors.lua
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
local HsvToRgb = require("theme.asset.hsv-to-rgb")
|
||||||
|
local colors = {
|
||||||
|
|
||||||
|
black = {HsvToRgb(0, 0, 0), 0},--0 Black
|
||||||
|
black_l = {HsvToRgb(0, 0, 10), 0},
|
||||||
|
black_ll = {HsvToRgb(0, 0, 20), 0},
|
||||||
|
|
||||||
|
gray_dd = {HsvToRgb(0, 0, 30), 8},--8 DarkGray
|
||||||
|
gray_d = {HsvToRgb(0, 0, 40), 8},
|
||||||
|
gray = {HsvToRgb(0, 0, 50), 7},--7 Gray
|
||||||
|
gray_l = {HsvToRgb(0, 0, 60), 7},
|
||||||
|
gray_ll = {HsvToRgb(0, 0, 70), 7},
|
||||||
|
|
||||||
|
white_dd = {HsvToRgb(0, 0, 80), 15},--15 White
|
||||||
|
white_d = {HsvToRgb(0, 0, 90), 15},
|
||||||
|
white = {HsvToRgb(0, 0, 100), 15},
|
||||||
|
|
||||||
|
red_d = {HsvToRgb(0, 100, 75), 12},--12 Red
|
||||||
|
red = {HsvToRgb(0, 100, 100), 12},
|
||||||
|
red_l = {HsvToRgb(0, 75, 100), 12},
|
||||||
|
|
||||||
|
orange_d = {HsvToRgb(30, 100, 75), 4},--4 DarkRed
|
||||||
|
orange = {HsvToRgb(30, 100, 100), 4},
|
||||||
|
orange_l = {HsvToRgb(30, 75, 100), 4},
|
||||||
|
|
||||||
|
yellow_d = {HsvToRgb(60, 100, 75), 14},--14 Yellow
|
||||||
|
yellow = {HsvToRgb(60, 100, 100), 14},
|
||||||
|
yellow_l = {HsvToRgb(60, 75, 100), 14},
|
||||||
|
|
||||||
|
chartreuse_d = {HsvToRgb(90, 100, 75), 6},--6 DarkYellow
|
||||||
|
chartreuse = {HsvToRgb(90, 100, 100), 6},
|
||||||
|
chartreuse_l = {HsvToRgb(90, 75, 100), 6},
|
||||||
|
|
||||||
|
green_d = {HsvToRgb(120, 100, 75), 10},--10 Green
|
||||||
|
green = {HsvToRgb(120, 100, 100), 10},
|
||||||
|
green_l = {HsvToRgb(120, 75, 100), 10},
|
||||||
|
|
||||||
|
turquoise_d = {HsvToRgb(150, 100, 75), 2},--2 DarkGreen
|
||||||
|
turquoise = {HsvToRgb(150, 100, 100), 2},
|
||||||
|
turquoise_l = {HsvToRgb(150, 75, 100), 2},
|
||||||
|
|
||||||
|
cyan_d = {HsvToRgb(180, 100, 75), 11},--11 Cyan
|
||||||
|
cyan = {HsvToRgb(180, 100, 100), 11},
|
||||||
|
cyan_l = {HsvToRgb(180, 75, 100), 11},
|
||||||
|
|
||||||
|
royal_d = {HsvToRgb(210, 100, 75), 3},--3 DarkCyan
|
||||||
|
royal = {HsvToRgb(210, 100, 100), 3},
|
||||||
|
royal_l = {HsvToRgb(210, 75, 100), 3},
|
||||||
|
|
||||||
|
blue_d = {HsvToRgb(240, 100, 75), 9},--9 Blue
|
||||||
|
blue = {HsvToRgb(240, 100, 100), 9},
|
||||||
|
blue_l = {HsvToRgb(240, 75, 100), 9},
|
||||||
|
|
||||||
|
purple_d = {HsvToRgb(270, 100, 75), 1},--1 DarkBlue
|
||||||
|
purple = {HsvToRgb(270, 100, 100), 1},
|
||||||
|
purple_l = {HsvToRgb(270, 75, 100), 1},
|
||||||
|
|
||||||
|
pink_d = {HsvToRgb(300, 100, 75), 13},--13 Magenta
|
||||||
|
pink = {HsvToRgb(300, 100, 100), 13},
|
||||||
|
pink_l = {HsvToRgb(300, 75, 100), 13},
|
||||||
|
|
||||||
|
salmon_d = {HsvToRgb(330, 100, 75), 5},--5 DarkMagenta
|
||||||
|
salmon = {HsvToRgb(330, 100, 100), 5},
|
||||||
|
salmon_l = {HsvToRgb(330, 75, 100), 5},
|
||||||
|
|
||||||
|
none = {"NONE", "NONE"}
|
||||||
|
}
|
||||||
|
return colors
|
16
nvim/lua/theme/modifiers.lua
Normal file
16
nvim/lua/theme/modifiers.lua
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
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
|
|
@ -13,6 +13,8 @@ source ~/.config/zsh/p10k/powerlevel10k.zsh-theme
|
||||||
source ~/.config/zsh/conf.d/*.zsh
|
source ~/.config/zsh/conf.d/*.zsh
|
||||||
source ~/.config/zsh/termsupport.zsh
|
source ~/.config/zsh/termsupport.zsh
|
||||||
source ~/.config/zsh/title.zsh
|
source ~/.config/zsh/title.zsh
|
||||||
|
foreground () { fg }
|
||||||
|
zle -N foreground
|
||||||
|
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
antigen bundle zsh-users/zsh-history-substring-search
|
antigen bundle zsh-users/zsh-history-substring-search
|
||||||
|
@ -146,7 +148,7 @@ bindkey "^[[1;5D" backward-word
|
||||||
bindkey "^[[1;5C" forward-word
|
bindkey "^[[1;5C" forward-word
|
||||||
bindkey "^H" backward-kill-word # delete previous word with ctrl+backspace
|
bindkey "^H" backward-kill-word # delete previous word with ctrl+backspace
|
||||||
bindkey "^[[Z" undo # Shift+tab undo last action
|
bindkey "^[[Z" undo # Shift+tab undo last action
|
||||||
|
bindkey "^z" foreground
|
||||||
# ctrl + space accept suggestion
|
# ctrl + space accept suggestion
|
||||||
bindkey "^ " autosuggest-accept
|
bindkey "^ " autosuggest-accept
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue