From c43c27f5dd82636b719a86e245f0a69de0084b74 Mon Sep 17 00:00:00 2001 From: pegasust Date: Sun, 24 Sep 2023 16:03:12 -0700 Subject: [PATCH 1/3] bug: there's also :LspInfo that is outdated --- native_configs/neovim/init.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/native_configs/neovim/init.lua b/native_configs/neovim/init.lua index 2fff908..c0eef8c 100644 --- a/native_configs/neovim/init.lua +++ b/native_configs/neovim/init.lua @@ -84,7 +84,7 @@ WPlug('hrsh7th/cmp-cmdline') WPlug('hrsh7th/nvim-cmp') WPlug('hrsh7th/cmp-nvim-lsp-signature-help') WPlug('onsails/lspkind-nvim') -WPlug('yioneko/nvim-yati', { tag = '*' }) -- copium: fix Python indent auto-correct from smart-indent +-- WPlug('yioneko/nvim-yati', { tag = '*' }) -- copium: fix Python indent auto-correct from smart-indent WPlug('nathanalderson/yang.vim') -- WPlug('tzachar/cmp-tabnine', { ['do'] = './install.sh' }) @@ -116,7 +116,7 @@ WPlug('gruvbox-community/gruvbox') -- theme provider WPlug('nvim-lualine/lualine.nvim') -- fancy status line WPlug('lukas-reineke/indent-blankline.nvim') -- identation lines on blank lines WPlug('kyazdani42/nvim-web-devicons') -- icons for folder and filetypes -WPlug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog +-- WPlug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog WPlug('folke/todo-comments.nvim') -- Highlights TODO WPlug('NvChad/nvim-colorizer.lua') -- color highlighter with tailwind support WPlug('roobert/tailwindcss-colorizer-cmp.nvim') -- color for tailiwnd for compe @@ -253,7 +253,7 @@ vim.keymap.set('n', 'gg', 'GuessIndent') vim.cmd([[ colorscheme gruvbox ]]) -require('hlargs').setup() +-- require('hlargs').setup() require('nvim-web-devicons').setup() require('trouble').setup { position = "bottom", -- position of the list can be: bottom, top, left, right @@ -588,12 +588,12 @@ vim.api.nvim_set_keymap('n', 'x', ':tabdo if tabpagenr() > 1 | tabclose | e -- treesitter require 'treesitter-context' require('nvim-treesitter.configs').setup { - yati = { - enable = true, - default_lazy = true, - default_fallback = "auto", - disable = { "nix" } - }, + -- yati = { + -- enable = true, + -- default_lazy = true, + -- default_fallback = "auto", + -- disable = { "nix" } + -- }, indent = { enable = false }, highlight = { enable = true, @@ -779,6 +779,8 @@ local on_attach = function(client, bufnr) -- enable inlay hints if available require('inlay-hints').on_attach(client, bufnr) + + client.server_capabilities.semanticTokensProvider = nil end require("sg").setup { -- 2.42.0 From da666d64b26aaf72c3c4283fd640f8e8ae1b84c9 Mon Sep 17 00:00:00 2001 From: pegasust Date: Sun, 24 Sep 2023 17:18:28 -0700 Subject: [PATCH 2/3] fix: make lspconfig bareable --- flake.lock | 29 +++++++++++++++++++++++------ flake.nix | 1 + native_configs/neovim/init.lua | 3 --- nix/repo/home-profiles/neovim.nix | 4 +--- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 58fa10c..fa9e6fc 100644 --- a/flake.lock +++ b/flake.lock @@ -758,11 +758,11 @@ ] }, "locked": { - "lastModified": 1695544722, - "narHash": "sha256-cEnhsF44oNXvX3caEWCrbz5se9tlIsT2UGz4WT/vE0U=", + "lastModified": 1695550077, + "narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=", "owner": "nix-community", "repo": "home-manager", - "rev": "4a6333265ed8f3abf4769db60735522bbaa7819d", + "rev": "a88df2fb101778bfd98a17556b3a2618c6c66091", "type": "github" }, "original": { @@ -1126,11 +1126,11 @@ }, "nixpkgs-latest": { "locked": { - "lastModified": 1695547706, - "narHash": "sha256-d0K3mDswIA7BNyFSD7p0xzfBFNLZamKaw20fVqiY37g=", + "lastModified": 1695597504, + "narHash": "sha256-CKhj6wOKqndfHsDg8CKVBbpJWG8zHRZRLi7MnOatf0U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c497931955af2ac89c77a0776bd07e8c8b410f4a", + "rev": "7a862f0a660d5bd850457a0ad7772e1672109ccd", "type": "github" }, "original": { @@ -1191,6 +1191,22 @@ "type": "github" } }, + "nixpkgs-vimplugins": { + "locked": { + "lastModified": 1695583468, + "narHash": "sha256-NRbfULcsDKXH4I5qKkqaXsBTqJQswDgasHDbhoDvPOE=", + "owner": "cornedor", + "repo": "nixpkgs", + "rev": "dc8c9800fa19a9c44fe15507d9700d8ff1dc507c", + "type": "github" + }, + "original": { + "owner": "cornedor", + "ref": "update-vim-plugins", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_10": { "locked": { "lastModified": 1654568412, @@ -1634,6 +1650,7 @@ "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs_12", "nixpkgs-latest": "nixpkgs-latest", + "nixpkgs-vimplugins": "nixpkgs-vimplugins", "sg-nvim": "sg-nvim", "std": "std_2" } diff --git a/flake.nix b/flake.nix index b390ec9..9af0ec3 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ # Should show the latest nixpkgs whenever possible inputs.nixpkgs.follows = "nixpkgs-latest"; }; + nixpkgs-vimplugins.url = "github:cornedor/nixpkgs/update-vim-plugins"; sg-nvim = { url = "git+https://github.com/pegasust/sg.nvim?ref=sg-cody-discover"; }; diff --git a/native_configs/neovim/init.lua b/native_configs/neovim/init.lua index c0eef8c..bb01c38 100644 --- a/native_configs/neovim/init.lua +++ b/native_configs/neovim/init.lua @@ -57,7 +57,6 @@ WPlug('MunifTanjim/nui.nvim') -- For some .so or .dylib neovim UI action -- plugins -WPlug('tjdevries/nlua.nvim') -- adds symbols of vim stuffs in init.lua WPlug('nvim-treesitter/nvim-treesitter') -- language parser engine for highlighting WPlug('nvim-treesitter/nvim-treesitter-textobjects') -- more text objects WPlug('nvim-telescope/telescope.nvim', { branch = '0.1.x' }) -- file browser @@ -779,8 +778,6 @@ local on_attach = function(client, bufnr) -- enable inlay hints if available require('inlay-hints').on_attach(client, bufnr) - - client.server_capabilities.semanticTokensProvider = nil end require("sg").setup { diff --git a/nix/repo/home-profiles/neovim.nix b/nix/repo/home-profiles/neovim.nix index 1bc69d0..4a7bbad 100644 --- a/nix/repo/home-profiles/neovim.nix +++ b/nix/repo/home-profiles/neovim.nix @@ -96,7 +96,7 @@ in { */ plugins = let inherit - (inputs.nixpkgs-latest.legacyPackages.${system}.vimPlugins) + (inputs.nixpkgs-vimplugins.legacyPackages.${system}.vimPlugins) plenary-nvim nvim-treesitter nvim-treesitter-textobjects @@ -127,7 +127,6 @@ in { mason-lspconfig-nvim mason-nvim neogit - nlua-nvim nvim-jqx nvim-surround nvim-web-devicons @@ -178,7 +177,6 @@ in { mason-lspconfig-nvim mason-nvim neogit - nlua-nvim nvim-jqx nvim-surround nvim-web-devicons -- 2.42.0 From fbbbd6510e3dd8c2134147c4e3b698e4e6465e3d Mon Sep 17 00:00:00 2001 From: pegasust Date: Sun, 24 Sep 2023 22:01:51 -0700 Subject: [PATCH 3/3] feat: git-lola and git-lol now has time --- nix/repo/home-configs/default.nix | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/nix/repo/home-configs/default.nix b/nix/repo/home-configs/default.nix index 69586b6..bf085bb 100644 --- a/nix/repo/home-configs/default.nix +++ b/nix/repo/home-configs/default.nix @@ -74,6 +74,40 @@ in { home.username = "hungtran"; home.homeDirectory = "/Users/hungtran"; home.stateVersion = "23.11"; + repo.shells.shellAliases = { + git-lol = '' + git log --graph --decorate --color=always --abbrev-commit \ + --pretty=format:'%C(auto)%h %d %C(cyan)%s %C(green)(%cr)%C(reset)' | + while IFS= read -r line; do + # Format the relative time + line=$(echo "$line" | sed -e 's/ minute/ min/' \ + -e 's/ week/ wk/' \ + -e 's/ hour/ hr/' \ + -e 's/ month/ mo/' \ + -e 's/ year/ yr/' \ + -e 's/ ago//') + + # Print the formatted line + echo "$line" + done | less -R + ''; + git-lola = '' + git log --graph --decorate --color=always --abbrev-commit --all\ + --pretty=format:'%C(auto)%h %d %C(cyan)%s %C(green)(%cr)%C(reset)' | + while IFS= read -r line; do + # Format the relative time + line=$(echo "$line" | sed -e 's/ minute/ min/' \ + -e 's/ week/ wk/' \ + -e 's/ hour/ hr/' \ + -e 's/ month/ mo/' \ + -e 's/ year/ yr/' \ + -e 's/ ago//') + + # Print the formatted line + echo "$line" + done | less -R + ''; + }; } ]; }; -- 2.42.0