From 1dec31d23cbbd1c80aa9295eb69cb0f77be060ba Mon Sep 17 00:00:00 2001 From: minhtrannhat Date: Thu, 30 Jan 2025 16:08:36 -0500 Subject: [PATCH] feat: update jan 2025 with new neovim --- doom-emacs/.doom.d/config.el | 44 ++-- doom-emacs/.doom.d/init.el | 9 +- doom-emacs/.doom.d/packages.el | 7 - git/.gitconfig | 3 + lvim/.config/lvim/config.lua | 9 - lvim/.config/lvim/lazy-lock.json | 64 +++--- nvim/.config/nvim/.gitignore | 8 + nvim/.config/nvim/.neoconf.json | 15 ++ nvim/.config/nvim/LICENSE | 201 ++++++++++++++++++ nvim/.config/nvim/README.md | 4 + nvim/.config/nvim/init.lua | 2 + nvim/.config/nvim/lazy-lock.json | 50 +++++ nvim/.config/nvim/lazyvim.json | 29 +++ nvim/.config/nvim/lua/config/autocmds.lua | 8 + nvim/.config/nvim/lua/config/keymaps.lua | 19 ++ nvim/.config/nvim/lua/config/lazy.lua | 53 +++++ nvim/.config/nvim/lua/config/options.lua | 3 + nvim/.config/nvim/lua/plugins/colorscheme.lua | 12 ++ nvim/.config/nvim/lua/plugins/discord.lua | 9 + nvim/.config/nvim/lua/plugins/example.lua | 197 +++++++++++++++++ nvim/.config/nvim/lua/plugins/lspconfig.lua | 6 + nvim/.config/nvim/lua/plugins/lualine.lua | 123 +++++++++++ nvim/.config/nvim/lua/plugins/tmux.lua | 18 ++ nvim/.config/nvim/stylua.toml | 3 + 24 files changed, 830 insertions(+), 66 deletions(-) create mode 100644 nvim/.config/nvim/.gitignore create mode 100644 nvim/.config/nvim/.neoconf.json create mode 100644 nvim/.config/nvim/LICENSE create mode 100644 nvim/.config/nvim/README.md create mode 100644 nvim/.config/nvim/init.lua create mode 100644 nvim/.config/nvim/lazy-lock.json create mode 100644 nvim/.config/nvim/lazyvim.json create mode 100644 nvim/.config/nvim/lua/config/autocmds.lua create mode 100644 nvim/.config/nvim/lua/config/keymaps.lua create mode 100644 nvim/.config/nvim/lua/config/lazy.lua create mode 100644 nvim/.config/nvim/lua/config/options.lua create mode 100644 nvim/.config/nvim/lua/plugins/colorscheme.lua create mode 100644 nvim/.config/nvim/lua/plugins/discord.lua create mode 100644 nvim/.config/nvim/lua/plugins/example.lua create mode 100644 nvim/.config/nvim/lua/plugins/lspconfig.lua create mode 100644 nvim/.config/nvim/lua/plugins/lualine.lua create mode 100644 nvim/.config/nvim/lua/plugins/tmux.lua create mode 100644 nvim/.config/nvim/stylua.toml diff --git a/doom-emacs/.doom.d/config.el b/doom-emacs/.doom.d/config.el index abbb1de..f23e46f 100644 --- a/doom-emacs/.doom.d/config.el +++ b/doom-emacs/.doom.d/config.el @@ -78,6 +78,34 @@ (custom-set-variables '(git-gutter:update-interval 0.02)) +(defun smerge-repeatedly () + "Perform smerge actions again and again" + (interactive) + (smerge-mode 1) + (smerge-transient)) +(after! transient + (transient-define-prefix smerge-transient () + [["Move" + ("n" "next" (lambda () (interactive) (ignore-errors (smerge-next)) (smerge-repeatedly))) + ("p" "previous" (lambda () (interactive) (ignore-errors (smerge-prev)) (smerge-repeatedly)))] + ["Keep" + ("b" "base" (lambda () (interactive) (ignore-errors (smerge-keep-base)) (smerge-repeatedly))) + ("u" "upper" (lambda () (interactive) (ignore-errors (smerge-keep-upper)) (smerge-repeatedly))) + ("l" "lower" (lambda () (interactive) (ignore-errors (smerge-keep-lower)) (smerge-repeatedly))) + ("a" "all" (lambda () (interactive) (ignore-errors (smerge-keep-all)) (smerge-repeatedly))) + ("RET" "current" (lambda () (interactive) (ignore-errors (smerge-keep-current)) (smerge-repeatedly)))] + ["Diff" + ("<" "upper/base" (lambda () (interactive) (ignore-errors (smerge-diff-base-upper)) (smerge-repeatedly))) + ("=" "upper/lower" (lambda () (interactive) (ignore-errors (smerge-diff-upper-lower)) (smerge-repeatedly))) + (">" "base/lower" (lambda () (interactive) (ignore-errors (smerge-diff-base-lower)) (smerge-repeatedly))) + ("R" "refine" (lambda () (interactive) (ignore-errors (smerge-refine)) (smerge-repeatedly))) + ("E" "ediff" (lambda () (interactive) (ignore-errors (smerge-ediff)) (smerge-repeatedly)))] + ["Other" + ("c" "combine" (lambda () (interactive) (ignore-errors (smerge-combine-with-next)) (smerge-repeatedly))) + ("r" "resolve" (lambda () (interactive) (ignore-errors (smerge-resolve)) (smerge-repeatedly))) + ("k" "kill current" (lambda () (interactive) (ignore-errors (smerge-kill-current)) (smerge-repeatedly))) + ("q" "quit" (lambda () (interactive) (smerge-auto-leave)))]])) + ;; (use-package rust-mode ;; :init ;; (setq rust-mode-treesitter-derive t)) @@ -96,8 +124,9 @@ ;; org org (setq +latex-viewers '(zathura)) + ;; auto render latex in org mode -(add-hook 'org-mode-hook 'org-fragtog-mode) +;;(add-hook 'org-mode-hook 'org-fragtog-mode) ;; zsh zsh (setq vterm-shell 'zsh) @@ -203,19 +232,6 @@ "s c" #'evil-ex-nohighlight) -;; We do a little bit of finger pointing -(use-package blamer - :bind (("s-i" . blamer-show-commit-info)) - :defer 20 - :custom - (blamer-idle-time 0.3) - (blamer-min-offset 40) - :custom-face - (blamer-face ((t :foreground "#7a88cf" - :background nil - :height 110 - :italic t)))) - ;; Lispys stuffs (setq clojure-indent-style :always-align) (add-hook 'lisp-mode-hook #'evil-cleverparens-mode) diff --git a/doom-emacs/.doom.d/init.el b/doom-emacs/.doom.d/init.el index a161ec0..339f4c7 100644 --- a/doom-emacs/.doom.d/init.el +++ b/doom-emacs/.doom.d/init.el @@ -21,7 +21,8 @@ ;;japanese ;;layout ; auie,ctsrnm is the superior home row :completion - (company +tng) ; the ultimate code completion backend + ;;(company +tng) ; the ultimate code completion backend + (corfu +orderless) ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... (ivy +fuzzy +icons) ; a search engine for love and life @@ -96,7 +97,7 @@ pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders ;;rgb ; creating color strings - taskrunner ; taskrunner for all your projects + ;; taskrunner ; taskrunner for all your projects terraform ; infrastructure as code tmux ; an API for interacting with tmux ;;upload ; map local to remote projects via ssh/ftp @@ -107,7 +108,7 @@ ;;agda ; types of types of types of types... ;;beancount ; mind the GAAP (cc +lsp) ; C > C++ == 1 - (clojure +lsp) ; java with a lisp + (clojure +lsp +tree-sitter) ; java with a lisp common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c @@ -115,7 +116,7 @@ ;;data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;dhall - elixir ; erlang done right + (elixir +lsp +tree-sitter) ; erlang done right ;;elm ; care for a cup of TEA? emacs-lisp ; drown in parentheses (erlang +lsp) ; an elegant language for a more civilized age diff --git a/doom-emacs/.doom.d/packages.el b/doom-emacs/.doom.d/packages.el index 7a33ab4..f5086a4 100644 --- a/doom-emacs/.doom.d/packages.el +++ b/doom-emacs/.doom.d/packages.el @@ -49,9 +49,6 @@ ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;(unpin! t) -;; gitty nitty -(package! blamer :recipe (:host github :repo "artawower/blamer.el")) - ;; evil parens (package! evil-cleverparens) @@ -63,10 +60,6 @@ (unpin! rustic) ;; orgy -;; (package! treesit-auto) -(package! org-pomodoro) -(package! org-fragtog) -(package! org-recur) (unpin! org-roam) (package! websocket) (package! org-roam-ui :recipe (:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out"))) diff --git a/git/.gitconfig b/git/.gitconfig index ad19032..bc0d751 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -39,12 +39,15 @@ [diff] colorMoved = default + [filter "lfs"] required = true clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process + [rebase] autostash = true + [core] autocrlf = input diff --git a/lvim/.config/lvim/config.lua b/lvim/.config/lvim/config.lua index 6b37402..0536b52 100644 --- a/lvim/.config/lvim/config.lua +++ b/lvim/.config/lvim/config.lua @@ -55,9 +55,7 @@ formatters.setup({ exe = "clang_format", filetypes = { "c", "cpp" }, }, - { exe = "prettier" }, { exe = "gofmt", filetypes = { "go" } }, - { exe = "eslint_d" }, { exe = "stylua", filetypes = { "lua" } }, { exe = "brittany", filetypes = { "haskell" } }, }) @@ -161,13 +159,6 @@ lvim.plugins = { require("colorizer").setup() -require("better_escape").setup({ - mapping = { "jk", "kj" }, -- a table with mappings to use - timeout = vim.o.timeoutlen, -- the time in which the keys must be hit in ms. Use option timeoutlen by default - clear_empty_lines = false, -- clear line after escaping if there is only whitespace - keys = "", -- keys used for escaping, if it is a function will use the result everytime -}) - vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "rust_analyzer" }) require("nord").setup({ diff --git a/lvim/.config/lvim/lazy-lock.json b/lvim/.config/lvim/lazy-lock.json index 8f8a0e0..c651747 100644 --- a/lvim/.config/lvim/lazy-lock.json +++ b/lvim/.config/lvim/lazy-lock.json @@ -2,60 +2,60 @@ "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "LuaSnip": { "branch": "master", "commit": "1def35377854535bb3b0f4cc7a33c083cdb12571" }, "alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" }, - "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" }, + "better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, - "bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" }, + "bufferline.nvim": { "branch": "main", "commit": "73edc1f2732678e7a681e3d3be49782610914f6b" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "friendly-snippets": { "branch": "main", "commit": "3e9a3f5a0cfcef1741e352c37bda4e82e5eb846a" }, + "friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" }, "gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" }, "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" }, - "hlargs.nvim": { "branch": "main", "commit": "30fe1b3de2b7614f061be4fc9c71984a2b87e50a" }, + "hlargs.nvim": { "branch": "main", "commit": "a5a7fdacc0ac2f7ca9d241e0e059cb85f0e733bc" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, "is.vim": { "branch": "master", "commit": "d393cb346dcdf733fecd7bbfc45b70b8c05e9eb4" }, - "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, + "lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" }, "lir.nvim": { "branch": "master", "commit": "7a9d45de08fecd23a04aca1f96688d744830029e" }, - "lsp_signature.nvim": { "branch": "master", "commit": "aed5d1162b0f07bb3af34bedcc5f70a2b6466ed8" }, + "lsp_signature.nvim": { "branch": "master", "commit": "5b64964ed02098c85613ee3d20f96bed1dfb64cc" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" }, - "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "neocord": { "branch": "main", "commit": "aa7a58023166533da83ca7b11c0d2569e45d7381" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, + "mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" }, + "neocord": { "branch": "main", "commit": "4d55d8dab2d5f2f272192add7a2c21982039c699" }, "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, - "nlsp-settings.nvim": { "branch": "main", "commit": "707b43110daf27c1aec8c16c2a92c2cb9a06f8df" }, + "nlsp-settings.nvim": { "branch": "main", "commit": "d92035e6c05cded5f1a7458b57506adbf29a5c9c" }, "none-ls.nvim": { "branch": "main", "commit": "3a4826687da4310af379515086d71faca4d21288" }, - "nord.nvim": { "branch": "main", "commit": "a6f4979566e44a69ddc80c9df73e960af1ab1840" }, - "nvim-autopairs": { "branch": "master", "commit": "14e97371b2aab6ee70054c1070a123dfaa3e217e" }, - "nvim-cmp": { "branch": "main", "commit": "cd2cf0c124d3de577fb5449746568ee8e601afc8" }, + "nord.nvim": { "branch": "main", "commit": "b0f3ed242fd8e5bafa7231367821d46c6c835dd8" }, + "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, + "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-dap": { "branch": "master", "commit": "13ce59d4852be2bb3cd4967947985cb0ceaff460" }, + "nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, - "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" }, - "nvim-tree.lua": { "branch": "master", "commit": "64f61e4c913047a045ff90bd188dd3b54ee443cf" }, - "nvim-treesitter": { "branch": "master", "commit": "d5a1c2b0c8ec5bb377a41c1c414b315d6b3e9432" }, - "nvim-ts-autotag": { "branch": "main", "commit": "aeb7090098722ffce16597bd0331105495640153" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bdccb9c67a42a5e2d99384dc9bfa29b1451528f" }, - "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, + "nvim-lspconfig": { "branch": "master", "commit": "eadcee1573ca9d0e0cd36a49f620186a8dfdc607" }, + "nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" }, + "nvim-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" }, + "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" }, + "nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" }, "onedarker.nvim": { "branch": "freeze", "commit": "b00dd2189f264c5aeb4cf04c59439655ecd573ec" }, - "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "dd1156723eb8483e4403eb8765bbdff456b6981d" }, - "rustaceanvim": { "branch": "master", "commit": "66466d4fe0b8988ba9e2932d3c41782c2efb683b" }, - "schemastore.nvim": { "branch": "main", "commit": "8c46453bdf84ad91877effb95e0b6c7b51ea7dda" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "68a869ec386df5b8fef9ce9907c6c0850400e205" }, + "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, + "schemastore.nvim": { "branch": "main", "commit": "9a5992a881583d886bfbb46631a09f736f0fae50" }, "spellsitter.nvim": { "branch": "master", "commit": "4af8640d9d706447e78c13150ef7475ea2c16b30" }, "structlog.nvim": { "branch": "main", "commit": "45b26a2b1036bb93c0e83f4225e85ab3cee8f476" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, - "tmux.nvim": { "branch": "main", "commit": "53ea7eab504730e7e8397fd2ae0133053d56afc8" }, - "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, - "tokyonight.nvim": { "branch": "main", "commit": "67afeaf7fd6ebba000633e89f63c31694057edde" }, - "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, - "vim-fugitive": { "branch": "master", "commit": "5a9bd42dd8dd127779f3cd8982a0419b7ca9c7f5" }, - "vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "d829aa64059001ee7b2c8c8aa9c4e6df0b17d893" }, + "tmux.nvim": { "branch": "main", "commit": "307bad95a1274f7288aaee09694c25c8cbcd6f1a" }, + "toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" }, + "tokyonight.nvim": { "branch": "main", "commit": "b9b494fa7f7bbf2fe0747b47fa290fb7a4eddcc7" }, + "trouble.nvim": { "branch": "main", "commit": "6f380b8826fb819c752c8fd7daaee9ef96d4c689" }, + "vim-fugitive": { "branch": "master", "commit": "d74a7cff4cfcf84f83cc7eccfa365488f3bbabc2" }, + "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "vim-sandwich": { "branch": "master", "commit": "74cf93d58ccc567d8e2310a69860f1b93af19403" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/nvim/.config/nvim/.gitignore b/nvim/.config/nvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/nvim/.config/nvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/nvim/.config/nvim/.neoconf.json b/nvim/.config/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/nvim/.config/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/nvim/.config/nvim/LICENSE b/nvim/.config/nvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/nvim/.config/nvim/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/nvim/.config/nvim/README.md b/nvim/.config/nvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/nvim/.config/nvim/README.md @@ -0,0 +1,4 @@ +# 💤 LazyVim + +A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). +Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..2514f9e --- /dev/null +++ b/nvim/.config/nvim/init.lua @@ -0,0 +1,2 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..b1c03da --- /dev/null +++ b/nvim/.config/nvim/lazy-lock.json @@ -0,0 +1,50 @@ +{ + "LazyVim": { "branch": "main", "commit": "2bea40c447b72e54ffb2d5cddc98d7798990796f" }, + "baleia.nvim": { "branch": "main", "commit": "1b25eac3ac03659c3d3af75c7455e179e5f197f7" }, + "blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "4965db2d6155c25db4e8417465fc2703fdf4c2b7" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "db28f29be928d18cbfb86fbfb9f83f584f658feb" }, + "cmake-tools.nvim": { "branch": "master", "commit": "83268ea6f969f1e6eaa85f72118a11acb6198bf0" }, + "conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" }, + "conjure": { "branch": "main", "commit": "367df2ce92252924911c7a0af389482d9c300e9b" }, + "flash.nvim": { "branch": "main", "commit": "f899265876ecdcf7352dbc9f0adf87068cedefbb" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "fzf-lua": { "branch": "main", "commit": "8af88e542d70ed397f297a81168be0dd3394b0d4" }, + "gitsigns.nvim": { "branch": "main", "commit": "31d2dcd144c7404dacbd2ca36b5abd37cc9fa506" }, + "grug-far.nvim": { "branch": "main", "commit": "59e744e21069fa382c898913e77d576fe9132214" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" }, + "mini.hipatterns": { "branch": "main", "commit": "f34975103a38b3f608219a1324cdfc58ea660b8b" }, + "mini.icons": { "branch": "main", "commit": "910db5df9724d65371182948f921fce23c2c881e" }, + "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, + "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, + "neo-tree.nvim": { "branch": "main", "commit": "6a4f0a830f2322f187bce6f18a9e6b5b7ba188e3" }, + "neocord": { "branch": "main", "commit": "4d55d8dab2d5f2f272192add7a2c21982039c699" }, + "noice.nvim": { "branch": "main", "commit": "e3c68a4d2275a01268a52e2931bfccfbfb693d15" }, + "none-ls.nvim": { "branch": "main", "commit": "ed8f80849ef1ad31c2f74679fafdef7801091247" }, + "nord.nvim": { "branch": "main", "commit": "b0f3ed242fd8e5bafa7231367821d46c6c835dd8" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-ansible": { "branch": "main", "commit": "44dabdaa8a9193b7f564a8408ed6d7107705030a" }, + "nvim-jdtls": { "branch": "master", "commit": "3efcd0700a293efea9dada58f79c32a64850eb24" }, + "nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" }, + "nvim-lspconfig": { "branch": "master", "commit": "8c5620b04121864a1b5af134d4c2c23cee68b6ef" }, + "nvim-treesitter": { "branch": "master", "commit": "110bdf91e3fcbc019efbac13026ae4ad9e4ededf" }, + "nvim-treesitter-sexp": { "branch": "master", "commit": "32509f4071f9c8ba5655bf2e1ccf1f1cd8447da0" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, + "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, + "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, + "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, + "snacks.nvim": { "branch": "main", "commit": "ffcacebf386dee2169cc9742347ba29429781b10" }, + "tmux.nvim": { "branch": "main", "commit": "307bad95a1274f7288aaee09694c25c8cbcd6f1a" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "dca4adba7dc5f09302a00b0e76078d54d82d2658" }, + "trouble.nvim": { "branch": "main", "commit": "6f380b8826fb819c752c8fd7daaee9ef96d4c689" }, + "ts-comments.nvim": { "branch": "main", "commit": "872dcfa0418f4a33b7437fb4d9f4e89f2f000d74" }, + "which-key.nvim": { "branch": "main", "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" }, + "yanky.nvim": { "branch": "main", "commit": "d2696b30e389dced94d5acab728f524a25f308d2" } +} diff --git a/nvim/.config/nvim/lazyvim.json b/nvim/.config/nvim/lazyvim.json new file mode 100644 index 0000000..a33378d --- /dev/null +++ b/nvim/.config/nvim/lazyvim.json @@ -0,0 +1,29 @@ +{ + "extras": [ + "lazyvim.plugins.extras.coding.mini-surround", + "lazyvim.plugins.extras.coding.yanky", + "lazyvim.plugins.extras.formatting.biome", + "lazyvim.plugins.extras.lang.ansible", + "lazyvim.plugins.extras.lang.clangd", + "lazyvim.plugins.extras.lang.clojure", + "lazyvim.plugins.extras.lang.cmake", + "lazyvim.plugins.extras.lang.docker", + "lazyvim.plugins.extras.lang.elixir", + "lazyvim.plugins.extras.lang.git", + "lazyvim.plugins.extras.lang.gleam", + "lazyvim.plugins.extras.lang.go", + "lazyvim.plugins.extras.lang.java", + "lazyvim.plugins.extras.lang.python", + "lazyvim.plugins.extras.lang.ruby", + "lazyvim.plugins.extras.lang.tailwind", + "lazyvim.plugins.extras.lang.terraform", + "lazyvim.plugins.extras.lang.typescript", + "lazyvim.plugins.extras.lang.zig", + "lazyvim.plugins.extras.lsp.none-ls", + "lazyvim.plugins.extras.util.mini-hipatterns" + ], + "news": { + "NEWS.md": "10960" + }, + "version": 7 +} \ No newline at end of file diff --git a/nvim/.config/nvim/lua/config/autocmds.lua b/nvim/.config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..4221e75 --- /dev/null +++ b/nvim/.config/nvim/lua/config/autocmds.lua @@ -0,0 +1,8 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- +-- Add any additional autocmds here +-- with `vim.api.nvim_create_autocmd` +-- +-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) +-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") diff --git a/nvim/.config/nvim/lua/config/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..b906bea --- /dev/null +++ b/nvim/.config/nvim/lua/config/keymaps.lua @@ -0,0 +1,19 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here +local Util = require("lazyvim.util") +local function map(mode, lhs, rhs, opts) + local keys = require("lazy.core.handler").handlers.keys + ---@cast keys LazyKeysHandler + -- do not create the keymap if a lazy keys handler exists + if not keys.active[keys.parse({ lhs, mode = mode }).id] then + opts = opts or {} + opts.silent = opts.silent ~= false + vim.keymap.set(mode, lhs, rhs, opts) + end +end + +map("n", "", "lua require'tmux'.move_left()", { desc = "Go to left window" }) +map("n", "", "lua require'tmux'.move_bottom()", { desc = "Go to lower window" }) +map("n", "", "lua require'tmux'.move_top()", { desc = "Go to upper window" }) +map("n", "", "lua require'tmux'.move_right()", { desc = "Go to right window" }) diff --git a/nvim/.config/nvim/lua/config/lazy.lua b/nvim/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..0a0b501 --- /dev/null +++ b/nvim/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,53 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import/override with your plugins + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = {} }, + checker = { + enabled = true, -- check for plugin updates periodically + notify = false, -- notify on update + }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/nvim/.config/nvim/lua/config/options.lua b/nvim/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..3ea1454 --- /dev/null +++ b/nvim/.config/nvim/lua/config/options.lua @@ -0,0 +1,3 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here diff --git a/nvim/.config/nvim/lua/plugins/colorscheme.lua b/nvim/.config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..0907e57 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,12 @@ +return { + -- add gruvbox + { "gbprod/nord.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "nord", + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/discord.lua b/nvim/.config/nvim/lua/plugins/discord.lua new file mode 100644 index 0000000..4265051 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/discord.lua @@ -0,0 +1,9 @@ +return { + "IogaMaster/neocord", + event = "VeryLazy", + opts = function() + return { + require("neocord").setup({}), + } + end, +} diff --git a/nvim/.config/nvim/lua/plugins/example.lua b/nvim/.config/nvim/lua/plugins/example.lua new file mode 100644 index 0000000..17f53d6 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/example.lua @@ -0,0 +1,197 @@ +-- since this is just an example spec, don't actually load anything here and return an empty spec +-- stylua: ignore +if true then return {} end + +-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim +-- +-- In your plugin files, you can: +-- * add extra plugins +-- * disable/enabled LazyVim plugins +-- * override the configuration of LazyVim plugins +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, + + -- change trouble config + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = true }, + }, + + -- disable trouble + { "folke/trouble.nvim", enabled = false }, + + -- override nvim-cmp and add cmp-emoji + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "emoji" }) + end, + }, + + -- change some telescope options and a keymap to browse plugin files + { + "nvim-telescope/telescope.nvim", + keys = { + -- add a keymap to browse plugin files + -- stylua: ignore + { + "fp", + function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, + desc = "Find Plugin File", + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + }, + }, + }, + + -- add pyright to lspconfig + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- pyright will be automatically installed with mason and loaded with lspconfig + pyright = {}, + }, + }, + }, + + -- add tsserver and setup with typescript.nvim instead of lspconfig + { + "neovim/nvim-lspconfig", + dependencies = { + "jose-elias-alvarez/typescript.nvim", + init = function() + require("lazyvim.util").lsp.on_attach(function(_, buffer) + -- stylua: ignore + vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) + end) + end, + }, + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- tsserver will be automatically installed with mason and loaded with lspconfig + tsserver = {}, + }, + -- you can do any additional lsp server setup here + -- return true if you don't want this server to be setup with lspconfig + ---@type table + setup = { + -- example to setup with typescript.nvim + tsserver = function(_, opts) + require("typescript").setup({ server = opts }) + return true + end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + }, + }, + + -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, + -- treesitter, mason and typescript.nvim. So instead of the above, you can use: + { import = "lazyvim.plugins.extras.lang.typescript" }, + + -- add more treesitter parsers + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + }, + + -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above + -- would overwrite `ensure_installed` with the new value. + -- If you'd rather extend the default config, use the code below instead: + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add tsx and treesitter + vim.list_extend(opts.ensure_installed, { + "tsx", + "typescript", + }) + end, + }, + + -- the opts function can also be used to change the default opts: + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, { + function() + return "😄" + end, + }) + end, + }, + + -- or you can return new options to override all the defaults + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function() + return { + --[[add your custom lualine config here]] + } + end, + }, + + -- use mini.starter instead of alpha + { import = "lazyvim.plugins.extras.ui.mini-starter" }, + + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, + + -- add any tools you want to have installed below + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "stylua", + "shellcheck", + "shfmt", + "flake8", + }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/lspconfig.lua b/nvim/.config/nvim/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..6c2afd4 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/lspconfig.lua @@ -0,0 +1,6 @@ +return { + "nvim-lspconfig", + opts = { + inlay_hints = { enabled = false }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..b8e1fd0 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/lualine.lua @@ -0,0 +1,123 @@ +return { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + init = function() + vim.g.lualine_laststatus = vim.o.laststatus + if vim.fn.argc(-1) > 0 then + -- set an empty statusline till lualine loads + vim.o.statusline = " " + else + -- hide the statusline on the starter page + vim.o.laststatus = 0 + end + end, + opts = function() + -- PERF: we don't need this lualine require madness 🤷 + local lualine_require = require("lualine_require") + lualine_require.require = require + + local icons = LazyVim.config.icons + + vim.o.laststatus = vim.g.lualine_laststatus + + local opts = { + options = { + theme = "auto", + globalstatus = vim.o.laststatus == 3, + disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter", "snacks_dashboard" } }, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch" }, + + lualine_c = { + LazyVim.lualine.root_dir(), + { + "diagnostics", + symbols = { + error = icons.diagnostics.Error, + warn = icons.diagnostics.Warn, + info = icons.diagnostics.Info, + hint = icons.diagnostics.Hint, + }, + }, + { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, + { LazyVim.lualine.pretty_path() }, + }, + lualine_x = { + Snacks.profiler.status(), + -- stylua: ignore + { + function() return require("noice").api.status.command.get() end, + cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, + color = function() return { fg = Snacks.util.color("Statement") } end, + }, + -- stylua: ignore + { + function() return require("noice").api.status.mode.get() end, + cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, + color = function() return { fg = Snacks.util.color("Constant") } end, + }, + -- stylua: ignore + { + function() return " " .. require("dap").status() end, + cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end, + color = function() return { fg = Snacks.util.color("Debug") } end, + }, + -- stylua: ignore + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = function() return { fg = Snacks.util.color("Special") } end, + }, + { + "diff", + symbols = { + added = icons.git.added, + modified = icons.git.modified, + removed = icons.git.removed, + }, + source = function() + local gitsigns = vim.b.gitsigns_status_dict + if gitsigns then + return { + added = gitsigns.added, + modified = gitsigns.changed, + removed = gitsigns.removed, + } + end + end, + }, + }, + lualine_y = { + { "progress", separator = " ", padding = { left = 1, right = 0 } }, + { "location", padding = { left = 0, right = 1 } }, + }, + lualine_z = {}, + }, + extensions = { "neo-tree", "lazy", "fzf" }, + } + + -- do not add trouble symbols if aerial is enabled + -- And allow it to be overriden for some buffer types (see autocmds) + if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then + local trouble = require("trouble") + local symbols = trouble.statusline({ + mode = "symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", + }) + table.insert(opts.sections.lualine_c, { + symbols and symbols.get, + cond = function() + return vim.b.trouble_lualine ~= false and symbols.has() + end, + }) + end + + return opts + end, +} diff --git a/nvim/.config/nvim/lua/plugins/tmux.lua b/nvim/.config/nvim/lua/plugins/tmux.lua new file mode 100644 index 0000000..a6e6761 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/tmux.lua @@ -0,0 +1,18 @@ +return { + { + "aserowy/tmux.nvim", + config = function() + require("tmux").setup({ + copy_sync = { + enable = false, + }, + navigation = { + enable_default_keybindings = true, + }, + resize = { + enable_default_keybindings = true, + }, + }) + end, + }, +} diff --git a/nvim/.config/nvim/stylua.toml b/nvim/.config/nvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/nvim/.config/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file