From b21ea374b157f43095ec2c0631e23af4fe769272 Mon Sep 17 00:00:00 2001 From: Buliway Date: Mon, 27 Jan 2025 11:35:10 +0300 Subject: [PATCH] fix zsh, add postman, new neovim settings --- modules/home-manager/terminal/zsh.nix | 17 +++++++++++++---- nixos/packages.nix | 1 + nvim/lua/kickstart/settings.lua | 10 ++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/modules/home-manager/terminal/zsh.nix b/modules/home-manager/terminal/zsh.nix index d7e69fa..953f53f 100644 --- a/modules/home-manager/terminal/zsh.nix +++ b/modules/home-manager/terminal/zsh.nix @@ -50,16 +50,25 @@ }; # Environment variables that will be set for zsh session. - sessionVariables = { - HISTORY_SUBSTRING_SEARCH_FUZZY = "не работает блять"; # Нечёткий поиск для стрелок вверх/вниз. - }; + # sessionVariables = { + # }; # Extra commands that should be added to .zshrc initExtra = '' source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh ''; - historySubstringSearch.enable = true; # Чтоб вверх/вниз учитывал уже написанную команду + historySubstringSearch = { + enable = true; # Чтоб вверх/вниз учитывал уже написанную команду + searchUpKey = [ + "^[[A" + "$terminfo[kcuu1]" + ]; + searchDownKey = [ + "^[[B" + "$terminfo[kcud1]" + ]; + }; oh-my-zsh = { # https://github.com/ohmyzsh/ohmyzsh enable = true; diff --git a/nixos/packages.nix b/nixos/packages.nix index ad0e4f7..f34cd95 100644 --- a/nixos/packages.nix +++ b/nixos/packages.nix @@ -186,6 +186,7 @@ taplo # TOML LSP vim-language-server # VimScript LSP go-migrate # Database migrations. CLI and Golang library + postman # API Development Environment # For nvim tree-sitter # For nvim diff --git a/nvim/lua/kickstart/settings.lua b/nvim/lua/kickstart/settings.lua index a6c0fba..4b95dcf 100644 --- a/nvim/lua/kickstart/settings.lua +++ b/nvim/lua/kickstart/settings.lua @@ -20,15 +20,25 @@ vim.opt.relativenumber = true -- Табуляция в 4 символа vim.opt.tabstop = 4 vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 -- Юзать пробелы вместо табов vim.opt.expandtab = true +-- yaml lsp за меня решают сколько пробелов мне надо. Это фикс +-- Их параметры конфига для переназначения не работают. Пришлось костыль сделать +vim.cmd [[ + autocmd FileType yaml setlocal shiftwidth=4 tabstop=4 softtabstop=4 expandtab +]] + -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' -- Don't show the mode, since it's already in the status line vim.opt.showmode = false +-- greatest remap ever +vim.keymap.set('x', 'p', '"_dP', { desc = '[P]aste' }) + -- Sync clipboard between OS and Neovim. -- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent.