diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua index 7bf310c..1a5f7ae 100644 --- a/config/nvim/lua/keymap.lua +++ b/config/nvim/lua/keymap.lua @@ -3,6 +3,7 @@ local map = vim.keymap.set -- jk exit from insert mode map("i", "jk", "noh", { silent = true }) +map({"n", "x"}, "", "noh", { silent = true }) ---- -- Movements @@ -33,6 +34,8 @@ map("n", ">", "BufferLineMoveNext", { desc = "Move buffer right -- ToggleTerm Bindings map("n", "a", "ToggleTerm name=main", { desc = "Floating Terminal", silent = true }) +-- Undotree +map('n', 'fu', vim.cmd.UndotreeToggle) ---- -- Cool Macros ---- diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 1cccdac..41b7d88 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -6,18 +6,18 @@ require'lspconfig'.texlab.setup{} require'lspconfig'.svls.setup{} require'lspconfig'.pylsp.setup{ settings = { + formatCommand = {"black"}, pylsp = { plugins = { - pycodestyle = { - ignore = {'W391'}, - maxLineLength = 100 + jedai_completion = { + fuzzy = true }, - pylint = { - enabled = false - }, - pyflakes = { - enabled = true - } + pyflakes = { + enabled = true + }, + pylsp_mypy = { + enabled = true + } } } } @@ -105,6 +105,15 @@ cmp.setup { package.path = package.path .. ";/etc/nixos/config/nvim" -- Funky plugins +require("conform").setup({ + formatters_by_ft = { + python = { "isort", "black" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_format = "fallback", + }, +}) require("bufferline").setup({ options = { always_show_bufferline = true, show_buffer_close_icons = false, diff --git a/packages/default.nix b/packages/default.nix index 18d8eed..74bd04d 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -64,13 +64,17 @@ in config = { environment.systemPackages = (lib.attrVals [ + "black" "btop" + "ccls" "eza" "fd" + "fzf" "git" "glib" "gnumake" "gnupg" + "mypy" "neofetch" "p7zip" "pinentry" @@ -97,6 +101,7 @@ in customRC = builtins.readFile ../config/nvim/init.vim; packages.myVimPackage = with pkgs.vimPlugins; { start = [ + conform-nvim bufferline-nvim cmp-nvim-lsp cmp_luasnip @@ -113,6 +118,7 @@ in toggleterm-nvim tokyonight-nvim typst-vim + undotree vim-lsp-cxx-highlight which-key-nvim ]; diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 721a06d..b30008d 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -60,9 +60,10 @@ in kicad #steamvr? procps + ripgrep usbutils yt-dlp - (python311.withPackages (lib.attrVals [ "matplotlib" "python-lsp-server" "sympy"])) + (python3.withPackages (lib.attrVals [ "matplotlib" "pyflakes" "python-lsp-server" "sympy"])) ] ++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs) ++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs);