summaryrefslogtreecommitdiff
path: root/config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config/nvim/init.lua2
-rw-r--r--config/nvim/lazy-lock.json50
-rw-r--r--config/nvim/lua/commands.lua7
-rw-r--r--config/nvim/lua/lsp.lua6
-rw-r--r--config/nvim/lua/options.lua2
-rw-r--r--config/nvim/lua/plugins.lua14
-rw-r--r--config/nvim/lua/plugins/cmp.lua10
-rw-r--r--config/nvim/lua/plugins/codecompanion.lua82
-rw-r--r--config/nvim/lua/plugins/dap_go.lua5
-rw-r--r--config/nvim/lua/plugins/todo.lua69
-rw-r--r--config/nvim/lua/plugins/zk.lua26
11 files changed, 61 insertions, 212 deletions
diff --git a/config/nvim/init.lua b/config/nvim/init.lua
index f6fd4ab..87ac2a9 100644
--- a/config/nvim/init.lua
+++ b/config/nvim/init.lua
@@ -35,4 +35,4 @@ require("autocommands")
require("lsp")
require("syntax")
-- require("dap")
-vim.cmd [[colorscheme nightfly]]
+ vim.cmd [[colorscheme sonokai]]
diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json
index f17796d..ce08936 100644
--- a/config/nvim/lazy-lock.json
+++ b/config/nvim/lazy-lock.json
@@ -1,37 +1,35 @@
{
- "LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
- "apidocs.nvim": { "branch": "main", "commit": "d6a5c8436d183ab85d8cf8e365ebc79920caf506" },
+ "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
+ "apidocs.nvim": { "branch": "main", "commit": "6f34023f9a14dda5fa1f06d8ffe53e689324d2d2" },
"auto-save.nvim": { "branch": "main", "commit": "37c82fd548e3f5ffc2d9d020a65dac1044584f44" },
- "blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" },
- "codecompanion.nvim": { "branch": "main", "commit": "9edf22cb71711cd7fab7671a25ed5424011a379d" },
- "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" },
+ "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
+ "conform.nvim": { "branch": "master", "commit": "9d859cbfbde7a1bd1770e7c97aef30ec5a237a71" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
- "go.nvim": { "branch": "master", "commit": "a3455f48cff718a86275115523dcc735535a13aa" },
+ "go.nvim": { "branch": "master", "commit": "db20146ef63322949af69b0955f80ee7d98145bd" },
"goerr-nvim": { "branch": "main", "commit": "d30ba1cab652e78dbf6a644eb4823be57e9af203" },
"goimpl.nvim": { "branch": "main", "commit": "2548d42c4db0645dea14f27e67c4b19b7030f1cf" },
- "guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" },
+ "guihua.lua": { "branch": "master", "commit": "c49a0fb7346586a1b1431d7e407f943c4164d8cb" },
"headlines.nvim": { "branch": "master", "commit": "bf17c96a836ea27c0a7a2650ba385a7783ed322e" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
- "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
- "lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" },
- "lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" },
- "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
- "nightfly": { "branch": "master", "commit": "8c55003e89f321a48a8cd4bb426dd3e7c58f0646" },
- "nvim-dap": { "branch": "master", "commit": "40a8189b8a57664a1850b0823fdcb3ac95b9f635" },
- "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
- "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
- "nvim-lspconfig": { "branch": "master", "commit": "7ad4a11cc5742774877c529fcfb2702f7caf75e4" },
+ "lazy.nvim": { "branch": "main", "commit": "59334064f8604ca073791c25dcc5c9698865406e" },
+ "lsp_signature.nvim": { "branch": "master", "commit": "62cadce83aaceed677ffe7a2d6a57141af7131ea" },
+ "lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
+ "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
+ "nightfly": { "branch": "master", "commit": "5f88609dd9c3883b50a2728537c55afd5544f466" },
+ "nvim-dap": { "branch": "master", "commit": "48570d8372f63c9e9ba399a16606f9553034a9b2" },
+ "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
+ "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
+ "nvim-lspconfig": { "branch": "master", "commit": "e688b486fe9291f151eae7e5c0b5a5c4ef980847" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
- "nvim-tree.lua": { "branch": "master", "commit": "d87b41ca537e2131622d48a6c25ccf2fbe0e5d62" },
+ "nvim-tree.lua": { "branch": "master", "commit": "87d096a39cb2d5d43e6771563575ff042a79f48b" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
- "nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" },
- "nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
- "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
- "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
- "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
+ "nvim-treesitter-context": { "branch": "master", "commit": "41847d3dafb5004464708a3db06b14f12bde548a" },
+ "nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
+ "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
+ "nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
+ "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
- "smartcolumn.nvim": { "branch": "main", "commit": "92f3773af80d674f1eb61e112dca79e2fa449fd1" },
- "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
- "todotxt.nvim": { "branch": "main", "commit": "225ac77fea10a9ad9a48d0247a8d3c23f33cb2ba" },
- "zk-nvim": { "branch": "main", "commit": "8fdd7032633045ece559273370fc0ec75ee8ffce" }
+ "smartcolumn.nvim": { "branch": "main", "commit": "b9cdbdf42f7ac5a659204cd5926017c7ff724a19" },
+ "sonokai": { "branch": "master", "commit": "cf50520d1cddf7a4e7bccae650cdf0a6dd362a10" },
+ "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }
}
diff --git a/config/nvim/lua/commands.lua b/config/nvim/lua/commands.lua
index 8a987b0..abba436 100644
--- a/config/nvim/lua/commands.lua
+++ b/config/nvim/lua/commands.lua
@@ -4,3 +4,10 @@ end, { force = true })
vim.api.nvim_create_user_command("Upper", function()
vim.cmd([[normal! gUaw]])
end, { force = true })
+vim.api.nvim_create_user_command("GoTestDebug", function()
+ require('dap-go').debug_test()
+end, { force = true })
+vim.api.nvim_create_user_command("GoTestDebugLast", function()
+ require('dap-go').debug_last_test()
+end, { force = true })
+
diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua
index 3ffa507..1031287 100644
--- a/config/nvim/lua/lsp.lua
+++ b/config/nvim/lua/lsp.lua
@@ -41,3 +41,9 @@ lspconfig.templ.setup(config({
filetypes = { "templ" },
root_markers = { "go.work", "go.mod", ".git" },
}))
+
+lspconfig.v_analyzer.setup(config({
+ cmd = { "v-analyzer" },
+ filetypes = { "v", "vv", "vsh" },
+ root_markers = { "v.mod", ".git" },
+}))
diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua
index d80d242..8c1366a 100644
--- a/config/nvim/lua/options.lua
+++ b/config/nvim/lua/options.lua
@@ -61,4 +61,4 @@ vim.filetype.add({
vim.g.nightflyCursorColor = true
vim.g.nightflyVirtualTextColor = true
-vim.g.nightflyTransparent = true
+vim.g.nightflyTransparent = false
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua
index 482d9a9..60b032d 100644
--- a/config/nvim/lua/plugins.lua
+++ b/config/nvim/lua/plugins.lua
@@ -1,5 +1,16 @@
require("lazy").setup({
{ "bluz71/vim-nightfly-colors", name = "nightfly", lazy = false, priority = 1000 },
+ {
+ "sainnhe/sonokai",
+ lazy = false,
+ priority = 1000,
+ config = function()
+ -- Optionally configure and load the colorscheme
+ -- directly inside the plugin declaration.
+ vim.g.sonokai_enable_italic = true
+ vim.cmd.colorscheme("sonokai")
+ end,
+ },
{ "nvim-lua/plenary.nvim" },
{
"ray-x/guihua.lua",
@@ -11,8 +22,6 @@ require("lazy").setup({
},
{ "Snyssfx/goerr-nvim" },
require("plugins.apidocs"),
- require("plugins.todo"),
- require("plugins.codecompanion"),
require("plugins.resize"),
require("plugins.blankline"),
require("plugins.headlines"),
@@ -31,7 +40,6 @@ require("lazy").setup({
require("plugins.lualine"),
require("plugins.telescope"),
require("plugins.columns"),
- require("plugins.zk"),
}, {
performance = {
rtp = {
diff --git a/config/nvim/lua/plugins/cmp.lua b/config/nvim/lua/plugins/cmp.lua
index d113fd5..3ac698f 100644
--- a/config/nvim/lua/plugins/cmp.lua
+++ b/config/nvim/lua/plugins/cmp.lua
@@ -35,6 +35,9 @@ return {
opts = {
keymap = {
preset = "enter",
+ ["<Tab>"] = false,
+ ["<C-k>"] = { "snippet_forward", "fallback" },
+ ["<C-S-k>"] = { "snippet_backward", "fallback" },
},
completion = {
list = {
@@ -61,7 +64,12 @@ return {
signature = { enabled = true },
snippets = { preset = "luasnip" },
sources = {
- default = { "lsp", "path", "snippets", "buffer", "codecompanion" },
+ default = {
+ "lsp",
+ "path",
+ "snippets",
+ "buffer",
+ },
},
},
}
diff --git a/config/nvim/lua/plugins/codecompanion.lua b/config/nvim/lua/plugins/codecompanion.lua
deleted file mode 100644
index c4ad892..0000000
--- a/config/nvim/lua/plugins/codecompanion.lua
+++ /dev/null
@@ -1,82 +0,0 @@
-return {
- "olimorris/codecompanion.nvim",
- version = "v15.8.0",
- opts = function()
- return {
- strategies = {
- chat = {
- adapter = "scbt",
- },
- inline = {
- adapter = "scbt",
- },
- cmd = {
- adapter = "scbt",
- },
- },
- adapters = {
- scbt = function()
- return require("codecompanion.adapters").extend("openai_compatible", {
- env = {
- url = "https://code-generator.sovcombank.group/api",
- api_key = "cmd:cat ~/.codetoken",
- chat_url = "/v1/chat/completions",
- models_endpoint = "/v1/models",
- },
- schema = {
- model = {
- default = "Qwen/Qwen2.5-Coder-14B-Instruct",
- },
- },
- })
- end,
- ollama = function()
- return require("codecompanion.adapters").extend("ollama", {
- name = "ollama",
- schema = {
- model = {
- default = "kodify_nano_q8",
- },
- },
- parameters = {
- sync = true,
- },
- })
- end,
- },
- opts = {
- log_level = "ERROR",
- language = "Russian",
- allow_insecure = true,
- cache_models_for = 1800,
- proxy = nil,
- show_defaults = false,
- show_model_choices = true,
- system_prompt = function(opts)
- return [[Ты — продвинутый помощник разработчика, встроенный в редактор кода. Твоя цель — помогать пользователям писать код быстрее и эффективнее, предлагая подсказки, исправления ошибок, оптимизацию производительности и комментарии к коду. Ты хорошо знаком с языками программирования, такими как Python, Go и прочими популярными языками.
-
-Основные задачи:
-- Давай точные и полезные советы по улучшению существующего кода.
-- Предлагай фрагменты кода для завершения текущего блока, исходя из контекста и намерений программиста.
-- Обеспечивай мгновенную помощь по синтаксическим ошибкам и советуй решения.
-- Объясняй сложные концепции простым языком.
-- Помогай находить альтернативные подходы и оптимизации производительности.
-- Уточняй любые неясности в вопросах пользователя перед предоставлением рекомендаций.
-
-Правила общения:
-- Отвечай коротко и ясно, особенно если речь идет о конкретных фрагментах кода.
-- Используй правильный синтаксис и следи за соответствием типов данных и стиля написания кода проекта.
-- Избегай ненужных деталей и отвлекающих пояснений.
-- Если требуется дополнительное разъяснение от пользователя, задавай конкретные уточняющие вопросы.
-- Общайся на русском языке
-
-Помоги создавать качественный и производительный код!]]
- end,
- },
- }
- end,
- dependencies = {
- "nvim-lua/plenary.nvim",
- "nvim-treesitter/nvim-treesitter",
- },
-}
diff --git a/config/nvim/lua/plugins/dap_go.lua b/config/nvim/lua/plugins/dap_go.lua
index 705fab7..262aef8 100644
--- a/config/nvim/lua/plugins/dap_go.lua
+++ b/config/nvim/lua/plugins/dap_go.lua
@@ -23,10 +23,9 @@ local function setup_go_configuration(dap, configs)
name = "Debug",
request = "launch",
program = "${workspaceFolder}",
- args = {},
- buildFlags = configs.delve.build_flags,
- outputMode = configs.delve.output_mode,
+ outputMode = "remote",
},
+
}
if dap.configurations.go == nil then
diff --git a/config/nvim/lua/plugins/todo.lua b/config/nvim/lua/plugins/todo.lua
deleted file mode 100644
index ee672ab..0000000
--- a/config/nvim/lua/plugins/todo.lua
+++ /dev/null
@@ -1,69 +0,0 @@
-return {
- "phrmendes/todotxt.nvim",
- cmd = { "TodoTxt", "DoneTxt" },
- opts = {
- todotxt = "/home/neonxp/Документы/todo.txt",
- donetxt = "/home/neonxp/Документы/done.txt",
- },
- -- suggested keybindings
- keys = {
- {
- "<leader>tp",
- function() require("todotxt").cycle_priority() end,
- desc = "todo.txt: cycle priority",
- ft = "todotxt",
- },
- {
- "<cr>",
- function() require("todotxt").toggle_todo_state() end,
- desc = "todo.txt: toggle task state",
- ft = "todotxt",
- },
- {
- "<leader>tn",
- function() require("todotxt").capture_todo() end,
- desc = "New entry",
- },
- {
- "<leader>tt",
- function() require("todotxt").toggle_todotxt() end,
- desc = "Open",
- },
- {
- "<leader>tr",
- function() require("todotxt").move_done_tasks() end,
- desc = "Move to done.txt",
- ft = "todotxt",
- },
- {
- "<leader>tss",
- function() require("todotxt").sort_tasks() end,
- desc = "Sort",
- ft = "todotxt",
- },
- {
- "<leader>tsd",
- function() require("todotxt").sort_tasks_by_due_date() end,
- desc = "Sort by due:date",
- ft = "todotxt",
- },
- {
- "<leader>tsP",
- function() require("todotxt").sort_tasks_by_priority() end,
- desc = "Sort by (priority)",
- ft = "todotxt",
- },
- {
- "<leader>tsc",
- function() require("todotxt").sort_tasks_by_context() end,
- desc = "Sort by @context",
- ft = "todotxt",
- },
- {
- "<leader>tsp",
- function() require("todotxt").sort_tasks_by_project() end,
- desc = "Sort by +project",
- ft = "todotxt",
- },
- },
-}
diff --git a/config/nvim/lua/plugins/zk.lua b/config/nvim/lua/plugins/zk.lua
deleted file mode 100644
index 1640b77..0000000
--- a/config/nvim/lua/plugins/zk.lua
+++ /dev/null
@@ -1,26 +0,0 @@
-return {
- "zk-org/zk-nvim",
- version = "v0.3.0",
- config = function()
- require("zk").setup({
- picker = "telescope",
-
- lsp = {
- -- `config` is passed to `vim.lsp.start(config)`
- config = {
- name = "zk",
- cmd = { "zk", "lsp" },
- filetypes = { "markdown" },
- -- on_attach = ...
- -- etc, see `:h vim.lsp.start()`
- },
-
- -- automatically attach buffers in a zk notebook that match the given filetypes
- auto_attach = {
- enabled = true,
- filetypes = { "markdown" }, -- moved to lsp.config above
- },
- },
- })
- end,
-}