diff --git a/flake.lock b/flake.lock index 30e47ba1..cc5d37a3 100644 --- a/flake.lock +++ b/flake.lock @@ -37,6 +37,22 @@ "type": "github" } }, + "coc-nvim": { + "flake": false, + "locked": { + "lastModified": 1672048825, + "narHash": "sha256-SYVv7xFjA6p0lkrnkXeaLXq+/6vZbJeh4i+ACoDMoSI=", + "owner": "neoclide", + "repo": "coc.nvim", + "rev": "d8e458300051a1f04531775c8d9b6f794890f947", + "type": "github" + }, + "original": { + "owner": "neoclide", + "repo": "coc.nvim", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -44,11 +60,11 @@ ] }, "locked": { - "lastModified": 1671196037, - "narHash": "sha256-2+J98SeczFWonbqFLMEAQC7vZEe6I2gM17XYvEmG52I=", + "lastModified": 1671891118, + "narHash": "sha256-+GJYiT7QbfA306ex4sGMlFB8Ts297pn3OdQ9kTd4aDw=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "adb8ac0453c8b2c40f5bffb578453dbaee838952", + "rev": "267040e7a2b8644f1fdfcf57b7e808c286dbdc7b", "type": "github" }, "original": { @@ -66,11 +82,11 @@ ] }, "locked": { - "lastModified": 1671268121, - "narHash": "sha256-LIOLFw5m2mYDjMo7eBB/cxYjhEqBnvQ8dpZvTjR6+Lo=", + "lastModified": 1672132398, + "narHash": "sha256-eiHIeVAv0/RioqX3N8FzMBNiDuj/PhwrxYbJbT+Yuu4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "249d14bdd55995eea2e0c9cfed8a230525faebde", + "rev": "ebbb22510930b5153de22357518ebd8ce7ed93b3", "type": "github" }, "original": { @@ -102,11 +118,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1671209729, - "narHash": "sha256-zxn1eA/rMi2DOx43V7q87bGaDzvL7CMVY/Ti7lJ92DQ=", + "lastModified": 1671966569, + "narHash": "sha256-jbLgfSnmLchARBNFRvCic63CFQ9LAyvlXnBpc2kwjQc=", "owner": "nix-community", "repo": "home-manager", - "rev": "7d55a72d4c1df694e87a41a7e6c9a7b6e9a40ca3", + "rev": "c55fa26ce05fee8e063db22918d05a73d430b2ea", "type": "github" }, "original": { @@ -153,11 +169,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1671228065, - "narHash": "sha256-Az/ig9LVL5xdqtyl4/CVKJIH1G7sP/9Ott2XnNyie0E=", + "lastModified": 1671631481, + "narHash": "sha256-LP6NvQQNKdqDpXngECo6oCiWfYRb0KPGM5+D5lu7mPw=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "e462a4baf75eeac639b4942481759de08a3bc94e", + "rev": "9577ab1eaf01a738b015a7a7ab2a4616e158b6cd", "type": "github" }, "original": { @@ -169,11 +185,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1671200928, - "narHash": "sha256-mZfzDyzojwj6I0wyooIjGIn81WtGVnx6+avU5Wv+VKU=", + "lastModified": 1671983799, + "narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "757b82211463dd5ba1475b6851d3731dfe14d377", + "rev": "fad51abd42ca17a60fc1d4cb9382e2d79ae31836", "type": "github" }, "original": { @@ -185,11 +201,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1671276751, - "narHash": "sha256-/wNWs1qVW8jf0Jr9Q1GI11EQ6CKtFq9J+1WkctVVdj8=", + "lastModified": 1672158941, + "narHash": "sha256-A6KENZ8/ke7YXpmpwVH4nTf5hLreFEUWW9Q+Z9jdomg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dd6b9ebd46ea372a80aea185fb87e6e91d9feef", + "rev": "23d58dae80cb6a9e14839be4e626ec4bc0963e32", "type": "github" }, "original": { @@ -305,6 +321,7 @@ "inputs": { "agenix": "agenix", "agkozak-zsh-prompt": "agkozak-zsh-prompt", + "coc-nvim": "coc-nvim", "darwin": "darwin", "emacs-overlay": "emacs-overlay", "home-manager": "home-manager", @@ -414,11 +431,11 @@ "zsh-completions": { "flake": false, "locked": { - "lastModified": 1671110471, - "narHash": "sha256-B7ia4UTIMwRza//NYRr7rZn9Kin2fbCnnXwH9MUZGBg=", + "lastModified": 1672136787, + "narHash": "sha256-rgS2d5mOKnVy+49AVPQ3wP/hOwtykAsdp6t0dyucvbU=", "owner": "zsh-users", "repo": "zsh-completions", - "rev": "b215131217582b1c634c57ffc61bf3e33190c5f1", + "rev": "b46602db397bf1af6bb6906e1a749da09fdda27d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 06b0d8f9..cc8c78d9 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,8 @@ ## vim nnn-vim.url = "github:mcchrish/nnn.vim"; nnn-vim.flake = false; + coc-nvim.url = "github:neoclide/coc.nvim"; + coc-nvim.flake = false; ## zsh zsh-completions.url = "github:zsh-users/zsh-completions"; diff --git a/hm-imports/nvim/config/coc.vim b/hm-imports/nvim/config/coc.vim index 8998139f..38f14004 100644 --- a/hm-imports/nvim/config/coc.vim +++ b/hm-imports/nvim/config/coc.vim @@ -1,6 +1,6 @@ -if system('id -u') > 500 - let g:coc_global_extensions = [ 'coc-markdownlint', 'coc-diagnostic', 'coc-angular', 'coc-css', 'coc-docker', 'coc-flutter-tools', 'coc-git', 'coc-homeassistant', 'coc-html', 'coc-json', 'coc-marketplace', 'coc-prettier', 'coc-pyright', 'coc-rls', 'coc-rust-analyzer', 'coc-scssmodules', 'coc-sh', 'coc-snippets', 'coc-stylelintplus', 'coc-swagger', 'coc-tabnine', 'coc-eslint', 'coc-tsserver', 'coc-webpack', 'coc-yaml' ] -endif +" if system('id -u') > 500 +" let g:coc_global_extensions = [ 'coc-markdownlint', 'coc-diagnostic', 'coc-angular', 'coc-css', 'coc-docker', 'coc-flutter-tools', 'coc-git', 'coc-homeassistant', 'coc-html', 'coc-json', 'coc-marketplace', 'coc-prettier', 'coc-pyright', 'coc-rls', 'coc-rust-analyzer', 'coc-scssmodules', 'coc-sh', 'coc-snippets', 'coc-stylelintplus', 'coc-swagger', 'coc-tabnine', 'coc-eslint', 'coc-tsserver', 'coc-webpack', 'coc-yaml' ] +" endif " \coc Some servers have issues with backup files, see #649. set nobackup set nowritebackup diff --git a/hm-imports/nvim/config/lua/keybindings.lua b/hm-imports/nvim/config/lua/keybindings.lua index f511f272..ec32b24c 100644 --- a/hm-imports/nvim/config/lua/keybindings.lua +++ b/hm-imports/nvim/config/lua/keybindings.lua @@ -16,8 +16,8 @@ map { 'n', '', 'k', noremap = true, silent = true} map { 'n', '', 'l', noremap = true, silent = true} -- buffer binds -map { 'n', ',q', ':bd', noremap = false, silent = true} -map { 'n', ',b', ':Buffers', noremap = false, silent = true} +map { 'n', 'q', ':bd', noremap = false, silent = true} +map { 'n', 'b', ':Buffers', noremap = false, silent = true} -- tab binds map { 'n', '', ':tabnew', noremap = false, silent = true} @@ -31,8 +31,8 @@ map { 'c', 'w!!', 'w !sudo tee > /dev/null %', noremap = false, silent = false} -- terminal -map { 'n', 't', ':term', noremap = false, silent = true} -map { 't', '', '', noremap = true, silent = true} +-- map { 'n', 't', ':term', noremap = false, silent = true} +-- map { 't', '', '', noremap = true, silent = true} -- plugins - commentary map { 'n', 'c', ':Commentary', noremap = false, silent = true} @@ -42,4 +42,5 @@ map { 'n', 'v', ':Vista!!', noremap = false, silent = true} map { 'n', '', '::NnnPicker %:p:h', noremap = true, silent = true} -- plugins - terminal -map {"n", "l", "lua _lazygit_toggle()", {noremap = true, silent = true}} +map {"n", "gg", "lua _lazygit_toggle()", {noremap = true, silent = true}} +map {"n", "gp", "lua _pipeline_toggle()", {noremap = true, silent = true}} diff --git a/hm-imports/nvim/config/lua/plugin/terminal.lua b/hm-imports/nvim/config/lua/plugin/terminal.lua index 3df9dd92..675b815b 100644 --- a/hm-imports/nvim/config/lua/plugin/terminal.lua +++ b/hm-imports/nvim/config/lua/plugin/terminal.lua @@ -14,9 +14,12 @@ function _lazygit_toggle() lazygit:toggle() end --- local pipeline = Terminal:new { --- cmd = "glab ci view", --- hidden = true, --- direction = 'float' --- } +local pipeline = Terminal:new { + cmd = "glab ci view", + hidden = true, + direction = 'float' +} +function _pipeline_toggle() + pipeline:toggle() +end diff --git a/hm-imports/nvim/config/nvim.lua b/hm-imports/nvim/config/nvim.lua index adf425f0..ccfd9d10 100644 --- a/hm-imports/nvim/config/nvim.lua +++ b/hm-imports/nvim/config/nvim.lua @@ -1,3 +1,6 @@ +-- mapleader +vim.g.mapleader = ' ' + require('utils') require('keybindings') require('filetypes') @@ -8,8 +11,9 @@ require('plugin.nnn') require('plugin.rainbow') require('plugin.terminal') + -- plugins - coc --- vim.cmd 'source ~/.config/nvim/coc.vim' -- too lazy to convert all the shit to lua +vim.cmd 'source ~/.config/nvim/coc.vim' -- too lazy to convert all the shit to lua -- terminal vim.cmd 'source ~/.config/nvim/terminal.vim' -- too lazy to convert all the shit to lua @@ -19,6 +23,7 @@ vim.cmd ':colorscheme gruvbox' opt.termguicolors = true -- 24bit color opt.background = 'dark' -- dark gruvbox + -- general settings vim.cmd [[ filetype plugin on @@ -43,5 +48,5 @@ opt.softtabstop = 2 -- buffers don't get unloaded when hidden opt.hidden = true -- low updatetime so it isnt as slow -opt.updatetime = 200 +opt.updatetime = 100 require('plugin.lualine') diff --git a/hm-imports/nvim/default.nix b/hm-imports/nvim/default.nix index ba203e71..e0473c56 100644 --- a/hm-imports/nvim/default.nix +++ b/hm-imports/nvim/default.nix @@ -2,14 +2,18 @@ { home.packages = with pkgs;[ python3 # ultisnips - #lazygit - #nodejs - #inputs.rnix-lsp.packages."${pkgs.system}".rnix-lsp - #shfmt - #shellcheck - #vim-vint - #nodePackages.write-good - #ctags + lazygit + nodejs # coc-nvim + yarn # coc-nvim + inputs.rnix-lsp.packages."${pkgs.system}".rnix-lsp + + # lsp + shfmt + shellcheck + vim-vint + glab + nodePackages.write-good + ctags ]; home.file.".config/nvim".source = ./config; home.file.".config/nvim".recursive = true; @@ -33,10 +37,10 @@ version = "1.0.0"; src = inputs.nnn-vim; }; - # coc-nvim = pkgs.vimUtils.buildVimPlugin { - # name = "coc-nvim"; - # src = inputs.coc-nvim; - # }; + #coc-nvim = pkgs.vimUtils.buildVimPlugin { + # name = "coc-nvim"; + # src = inputs.coc-nvim; + #}; #dart-vim = pkgs.vimUtils.buildVimPlugin { # name = "dart-vim"; # src = inputs.dart-vim; @@ -63,12 +67,63 @@ fzfWrapper vim-devicons toggleterm-nvim - # undotree - # vim-pandoc - # vim-pandoc-syntax - # ultisnips - # coc-nvim + undotree + vim-pandoc + vim-pandoc-syntax + ultisnips #dart-vim + + coc-nvim + + #telescope-coc-nvim + #coc-yank + coc-yaml + #coc-wxml + #coc-vimtex + #coc-vimlsp + #coc-vetur # vue + coc-ultisnips + coc-tsserver + #coc-tslint-plugin + #coc-tslint + coc-toml + #coc-texlab + #coc-tailwindcss + #coc-tabnine + #coc-svelte + #coc-sumneko-lua + coc-stylelint + coc-sqlfluff + #coc-spell-checker + #coc-solargraph # ruby + coc-snippets + #coc-smartf + coc-sh + #coc-rust-analyzer + coc-rls + #coc-r-lsp + coc-python + #coc-pyright + coc-prettier + #coc-pairs + #coc-nginx + #coc-neco + #coc-metals + coc-markdownlint + coc-lua + #coc-lists + coc-json + coc-jest + coc-java + #coc-imselect + coc-html + coc-highlight + #coc-haxe + coc-go + #coc-git + #coc-fzf + coc-flutter + #coc-explorer ]); }; } diff --git a/hosts/daedalus/default.nix b/hosts/daedalus/default.nix index c54f4709..5d00d780 100644 --- a/hosts/daedalus/default.nix +++ b/hosts/daedalus/default.nix @@ -71,10 +71,10 @@ in programs.home-manager.enable = true; home.stateVersion = "21.11"; - home.shellAliases = { - v = lib.mkForce "emacsclient -t"; - vv = lib.mkForce "emacsclient -c"; - }; + #home.shellAliases = { + # v = lib.mkForce "emacsclient -t"; + # vv = lib.mkForce "emacsclient -c"; + #}; home.sessionVariables = { EDITOR = "nvim"; VISUAL = "nvim";