From d73ac0037b50098f7be7aaa0f9c8f84c9d5b2d11 Mon Sep 17 00:00:00 2001 From: Buliway Date: Wed, 25 Feb 2026 05:06:53 +0300 Subject: [PATCH] zalupa --- flake.lock | 6 ++-- modules/home-manager/wm/bspwm/polybar.nix | 30 ++++++++--------- nixos/packages.nix | 8 ++--- nvim/init.lua | 4 +++ nvim/lazy-lock.json | 6 ++-- nvim/lua/custom/plugins/ai.lua | 39 +++++++++++++++++++++++ nvim/lua/custom/plugins/symbol_usage.lua | 13 +++++++- 7 files changed, 81 insertions(+), 25 deletions(-) create mode 100644 nvim/lua/custom/plugins/ai.lua diff --git a/flake.lock b/flake.lock index cd4695c..329ad1a 100644 --- a/flake.lock +++ b/flake.lock @@ -194,11 +194,11 @@ }, "nixpkgs2": { "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "lastModified": 1771369470, + "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "rev": "0182a361324364ae3f436a63005877674cf45efb", "type": "github" }, "original": { diff --git a/modules/home-manager/wm/bspwm/polybar.nix b/modules/home-manager/wm/bspwm/polybar.nix index 2f61337..d54e176 100644 --- a/modules/home-manager/wm/bspwm/polybar.nix +++ b/modules/home-manager/wm/bspwm/polybar.nix @@ -59,7 +59,7 @@ in { # Статус бар внизу modules-left = "bspwm title"; modules-center = "time"; - modules-right = "cpu memory alsa tray xkeyboard rofi power"; + modules-right = "cpu memory tray xkeyboard rofi power"; wm-restack = "bspwm"; font-0 = "NotoSans Nerd Font:style=Regular:size=12;3"; @@ -274,7 +274,7 @@ in { # Статус бар внизу label-occupied = "%name%"; label-occupied-foreground = config.lib.stylix.colors.base00; - label-occupied-background= config.lib.stylix.colors.base04; + label-occupied-background= config.lib.stylix.colors.base05; label-occupied-padding = "5pt"; label-urgent = "%name%"; @@ -319,19 +319,19 @@ in { # Статус бар внизу tray-size = "90%"; }; - "module/alsa" = { - type = "internal/alsa"; - master-soundcard = "default"; - speaker-soundcard = "default"; - headphone-soundcard = "default"; - master-mixer = "Master"; - interval = 5; - format-volume = ""; - format-muted = ""; - label-volume = " %percentage%"; - label-muted = " %percentage%"; - click-right = "exec pavucontrol"; - }; + # "module/alsa" = { + # type = "internal/alsa"; + # master-soundcard = "default"; + # speaker-soundcard = "default"; + # headphone-soundcard = "default"; + # master-mixer = "Master"; + # interval = 5; + # format-volume = ""; + # format-muted = ""; + # label-volume = " %percentage%"; + # label-muted = " %percentage%"; + # click-right = "exec pavucontrol"; + # }; "module/memory" = { type = "internal/memory"; diff --git a/nixos/packages.nix b/nixos/packages.nix index 8493c89..f8fd3fe 100644 --- a/nixos/packages.nix +++ b/nixos/packages.nix @@ -378,7 +378,7 @@ ## Media ## ########### - strawberry + pkgs2.strawberry obs-studio picard # Массовый редактор метаданных музыки mousai # Опенсорс шазам. Со временем просит платный api @@ -395,7 +395,7 @@ # withVencord = true; # }) pkgs2.discord - pkgs2.vesktop + # pkgs2.vesktop pkgs2.telegram-desktop ########### @@ -403,8 +403,8 @@ ########### lutris # Запускать .exe игры. Не всё через `wine game.exe` работает на nixos нормально - sidequest # Ставить APK файлы на Oculus Quest 2 - bs-manager # Удобно ставить моды и менять версии Beat Saber + # sidequest # Ставить APK файлы на Oculus Quest 2 + # bs-manager # Удобно ставить моды и менять версии Beat Saber protonup-qt # Управлять версиями proton-ge # steam-run # Запуск бинарей в окружении, похожем на steam runtime diff --git a/nvim/init.lua b/nvim/init.lua index aba099b..1c1d9b2 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -103,7 +103,11 @@ require('lazy').setup({ -- Adding history for nvim clipboard require 'custom.plugins.clip_history', + -- AI completion + require 'custom.plugins.ai', + -- Autoformat markdown tables + -- Run the :Mtm command to toggle markdown table mode. { 'Kicamon/markdown-table-mode.nvim', config = function() diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 9827d58..22c283f 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -7,6 +7,7 @@ "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "gitsigns.nvim": { "branch": "main", "commit": "011dc6718bcebdf92a5336bb0da79189c3afe621" }, "go.nvim": { "branch": "master", "commit": "da15ca55705c57ca10de1fbc1f0b6d6327c13e55" }, + "gruvbox-material": { "branch": "master", "commit": "146f40fd42cbef30fed69b4ef51329aeeaceb909" }, "gruvbox.nvim": { "branch": "main", "commit": "15958f5ee43e144856cd2084ce6c571bfdb44504" }, "guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" }, "image.nvim": { "branch": "master", "commit": "6ffafab2e98b5bda46bf227055aa84b90add8cdc" }, @@ -19,8 +20,9 @@ "mason-nvim-dap.nvim": { "branch": "main", "commit": "09220b99d63d5363f219daa2785242ee5fddba7f" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.nvim": { "branch": "main", "commit": "03387f53f1cb8c6a8ba0798041c6aa3525ed11ba" }, + "mini.nvim": { "branch": "main", "commit": "2d873a0eaa9f37b105c7751bb0a2e30eb448120d" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "1ef260eb4f54515fe121a2267b477efb054d108a" }, + "neocodeium": { "branch": "main", "commit": "bfe790d78e66adaa95cb50a8c75c64a752336e9c" }, "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, @@ -40,7 +42,7 @@ "symbol-usage.nvim": { "branch": "main", "commit": "e07c07dfe7504295a369281e95a24e1afa14b243" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } diff --git a/nvim/lua/custom/plugins/ai.lua b/nvim/lua/custom/plugins/ai.lua new file mode 100644 index 0000000..3b95097 --- /dev/null +++ b/nvim/lua/custom/plugins/ai.lua @@ -0,0 +1,39 @@ +-- :NeoCodeium chat - opens browser with the Windsurf Chat +-- :NeoCodeium restart - restarts the server (useful if the server stops responding for any reason). +-- :NeoCodeium toggle_buffer - toggles NeoCodeium completion in the current buffer. +-- :NeoCodeium[!] toggle - toggles NeoCodeium completion. Convey the bang to disable command. + +return { + 'monkoose/neocodeium', + event = 'VeryLazy', + config = function() + local neocodeium = require 'neocodeium' + neocodeium.setup { + filter = function(bufnr) + -- отключаем в .env по имени файла + local name = vim.api.nvim_buf_get_name(bufnr) + if vim.endswith(name, '.env') then + return false + end + + -- отключаем в txt, markdown, пустом filetype и nix + -- узнать filetype можно через `:set filetype?` + local ft = vim.bo[bufnr].filetype + if ft == 'txt' or ft == 'markdown' or ft == 'text' or ft == '' or ft == 'nix' then + return false + end + return true + end, + } + + -- Бинды (в insert mode) ('', neocodeium.accept, { desc = 'Accept NeoCodeium suggestion' }) + vim.keymap.set('i', '', neocodeium.clear, { desc = 'Clear suggestion' }) + + vim.keymap.set('i', '', neocodeium.accept_word, { desc = 'Accept next word (NeoCodeium)' }) + vim.keymap.set('i', '', neocodeium.accept_line, { desc = 'Accept next line (NeoCodeium)' }) + + vim.keymap.set('i', '', neocodeium.accept_word, { desc = 'Accept next word (h j k l style)' }) + vim.keymap.set('i', '', neocodeium.accept_line, { desc = 'Accept next line (h j k l style)' }) + end, +} diff --git a/nvim/lua/custom/plugins/symbol_usage.lua b/nvim/lua/custom/plugins/symbol_usage.lua index 42c705c..b7b0f78 100644 --- a/nvim/lua/custom/plugins/symbol_usage.lua +++ b/nvim/lua/custom/plugins/symbol_usage.lua @@ -70,7 +70,17 @@ return { event = 'LspAttach', -- need run before LspAttach if you use nvim 0.9. On 0.10 use 'LspAttach' config = function() require('symbol-usage').setup { - filetypes = {}, + filetypes = { + -- python = { + -- kinds = { + -- SymbolKind.Function, + -- SymbolKind.Method, + -- SymbolKind.Class, + -- SymbolKind.Struct, + -- SymbolKind.Constant, + -- }, + -- }, + }, log = { enabled = false, level = 'INFO', stdout = {}, log_file = {}, notify = {} }, text_format = text_format, kinds = { @@ -81,6 +91,7 @@ return { -- SymbolKind.Variable, SymbolKind.Constant, }, + disable = { filetypes = { 'nix' } }, } end, },