update documentation and format markdown

This commit is contained in:
Youwen Wu 2024-04-24 23:46:30 -07:00
parent 15071a8669
commit 9c9f8cb96f
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
4 changed files with 69 additions and 26 deletions

2
.prettierrc.toml Normal file
View file

@ -0,0 +1,2 @@
proseWrap = "always"
printWidth = 80

View file

@ -1,16 +1,32 @@
# 💤 Neovim Dotfiles # Neovim Dotfiles
My Neovim configuration files, built on top of [LazyVim](https://github.com/LazyVim/LazyVim). Makes Neovim an actual usable IDE. My Neovim configuration files, built on top of
[LazyVim](https://github.com/LazyVim/LazyVim). Makes Neovim an actual usable
IDE.
The main goal of this setup is to reach somewhat feature parity with VSCode's Intellisense features (in other words, to be _at least_ as productive as in VSCode). The main goal of this setup is to reach somewhat feature parity with VSCode's
Intellisense features (in other words, to be _at least_ as productive as in
VSCode). Since the majority of VS Code's "IntelliSense" features are really just
its wrapper around an LSP, almost all useful VS Code features (except maybe the
debugger) are also available in Neovim.
You probably shouldn't use these dotfiles, because you'd likely be better off
just installing LazyVim yourself and setting things up how you like. This is
mainly here as a personal backup, and to leave notes for my own use. But, I'll
try to document as much as I can, anyways.
## Installation ## Installation
Ensure you have the latest version of Neovim installed, and remove or backup your existing settings. Install `tree-sitter-cli` with either `cargo` or `npm`, and ensure `npm` and `tree-sitter-cli` are on your `PATH`. Ensure you have the latest version of Neovim installed, and remove or backup
your existing settings. Install `tree-sitter-cli` with either `cargo` or `npm`,
and ensure `npm` and `tree-sitter-cli` are on your `PATH`.
```sh ```sh
# remove it
rm -rf ~/.config/nvim rm -rf ~/.config/nvim
mv ~/.nvim ~/.nvim.bak
# or back it up, if you have settings you don't want to lose.
mv ~/.config/nvim ~/.config/nvim.bak
# with npm (or pnpm, bun, yarn) # with npm (or pnpm, bun, yarn)
npm install --global tree-sitter-cli npm install --global tree-sitter-cli
@ -19,33 +35,57 @@ npm install --global tree-sitter-cli
cargo install tree-sitter-cli cargo install tree-sitter-cli
``` ```
Then, clone this repository into where Neovim is expecting configuration files (usually `~/.config/nvim`). Then, clone this repository into where Neovim is expecting configuration files
(usually `~/.config/nvim`).
```sh ```bash
git clone https://github.com/couscousdude/neovim-dots ~/.config/nvim git clone https://github.com/couscousdude/neovim-dots ~/.config/nvim
``` ```
Launch Neovim and it should automatically setup `lazy.nvim` and install all plugins. Launch Neovim and it should automatically setup `lazy.nvim` and install all
plugins.
You can install LSPs for new languages by running `:MasonInstall <language>` and Treesitter parsers with `:TSInstall <language>`. You can install LSPs for new languages by running `:MasonInstall <language>` and
Treesitter parsers with `:TSInstall <language>`.
Set up Copilot with `:Copilot setup` and follow the instructions (or remove it by going to the LazyVim "Extras" section and uninstalling it. You can replace it with Codeium or Tab9). Set up Copilot with `:Copilot setup` and follow the instructions (or remove it
by going to the LazyVim "Extras" section and uninstalling it. You can replace it
with Codeium or Tab9).
Set up Wakatime with `:WakaTimeApiKey` (or uninstall it by removing its entry from `nvim/lua/plugins/extras.lua`). Set up Wakatime with `:WakaTimeApiKey` (or uninstall it by removing its entry
from `nvim/lua/plugins/extras.lua`).
Check the [LazyVim documentation](https://github.com/LazyVim/LazyVim) for more information on the rest of the features and plugins. Check the [LazyVim documentation](https://github.com/LazyVim/LazyVim) for more
information on the rest of the features and plugins.
## Notes
- Trouble v3 seems to be breaking in specific situations (esp. in Svelte) when
used with the lua-line. I disabled it for now because statusline is more
important and regular trouble.nvim seems to work fine. Maybe upgrading to
neovim 0.10.x will help.
## Non-exhaustive list of changes on top of LazyVim ## Non-exhaustive list of changes on top of LazyVim
- More LSP configuration - More LSP configuration
- `typescript-tools.nvim` to replace `typescript-language-server` from Mason, to reduce crashes and improve performance. - `typescript-tools.nvim` to replace `typescript-language-server` from Mason,
to reduce crashes and improve performance.
- `tailwind-fold` to fold long CSS classnames - `tailwind-fold` to fold long CSS classnames
- `vim-wakatime` to track time spent coding. - `vim-wakatime` to track time spent coding.
- Made background transparent and increased some colors to increase contrast (line numbers, etc). - Made background transparent and increased some colors to increase contrast
(line numbers, etc).
- Add `presence.nvim` for Discord Rich Presence integration. - Add `presence.nvim` for Discord Rich Presence integration.
- Add Arch logo to the dashboard (page that initially opens if you type `nvim`) (did I mention I use Arch btw). - Add Arch logo to the dashboard (page that initially opens if you type `nvim`)
(did I mention I use Arch btw).
- Fix various annoyances with plugins: - Fix various annoyances with plugins:
- Disable duplicate TS error reports from `tsserver` and `typescript-language-server`. - Disable duplicate TS error reports from `tsserver` and
- Rebind window resizing to use the `<alt>` key instead of `<ctrl>` because it conflicts with macOS window change shortcuts. `typescript-language-server`.
- Configure notification plugin (`noice.nvim`) to suppress "No information available" when triggering hover (this is to prevent tailwind-language-server from showing this message on every hover when editing files containing both Tailwind and other languages with LSPs, such as `.svelte`). - Rebind window resizing to use the `<alt>` key instead of `<ctrl>` because it
conflicts with macOS window change shortcuts.
- Configure notification plugin (`noice.nvim`) to suppress "No information
available" when triggering hover (this is to prevent
tailwind-language-server from showing this message on every hover when
editing files containing both Tailwind and other languages with LSPs, such
as `.svelte`).
- Move `neo-tree` to the right side of the screen by default (life changing). - Move `neo-tree` to the right side of the screen by default (life changing).
- Add TeX support.

View file

@ -1,17 +1,17 @@
{ {
"LazyVim": { "branch": "main", "commit": "9b4675ddde38fdae09978bd7dbdba83ec91f4d80" }, "LazyVim": { "branch": "main", "commit": "9b4675ddde38fdae09978bd7dbdba83ec91f4d80" },
"LuaSnip": { "branch": "master", "commit": "72eea98b1900013e0cb214f29b898c8d91564930" }, "LuaSnip": { "branch": "master", "commit": "8f3d3465ba5c7ade0a8adb41eca5736f291a3fa8" },
"SchemaStore.nvim": { "branch": "main", "commit": "a0dc19e5f9aaebdf2866fcbbf70809da53a4c62b" }, "SchemaStore.nvim": { "branch": "main", "commit": "d346238565f2028eafee39283ae026357d5642d6" },
"bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" }, "bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" },
"catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "475c096d24562cf1fa992731869e17ea6d75d2d9" }, "conform.nvim": { "branch": "master", "commit": "4660e534bf7678ee0f85879aa75fdcb6855612c2" },
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" }, "copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" },
"crates.nvim": { "branch": "main", "commit": "786d12a70c9b91fa2d0d102bb07df02be0db31a1" }, "crates.nvim": { "branch": "main", "commit": "f00e11e8282b94f2a2e938d32712c99f0e0bdeb4" },
"dashboard-nvim": { "branch": "master", "commit": "6d06924b562de6f0bb136edf1bf549afbf6b7d00" }, "dashboard-nvim": { "branch": "master", "commit": "6d06924b562de6f0bb136edf1bf549afbf6b7d00" },
"dressing.nvim": { "branch": "master", "commit": "5162edb1442a729a885c45455a07e9a89058be2f" }, "dressing.nvim": { "branch": "master", "commit": "5162edb1442a729a885c45455a07e9a89058be2f" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
@ -32,7 +32,7 @@
"mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" },
"mini.surround": { "branch": "main", "commit": "a00d69be09e3fe27dfa9e5b0298410d0e148e3e2" }, "mini.surround": { "branch": "main", "commit": "a00d69be09e3fe27dfa9e5b0298410d0e148e3e2" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" },
"neoconf.nvim": { "branch": "main", "commit": "d4a353c4275046136a4ae84454898a944d01a868" }, "neoconf.nvim": { "branch": "main", "commit": "bc99367aedf1fd5524f17eaaadc98d6329047075" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" }, "noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" },
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
@ -41,8 +41,8 @@
"nvim-lspconfig": { "branch": "master", "commit": "cfa386fc4027e847156ee16141ea1f4c0bc2f0a4" }, "nvim-lspconfig": { "branch": "master", "commit": "cfa386fc4027e847156ee16141ea1f4c0bc2f0a4" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-spectre": { "branch": "master", "commit": "026394a8458d62c6b7b305c076ce675420dbaa4c" }, "nvim-spectre": { "branch": "master", "commit": "026394a8458d62c6b7b305c076ce675420dbaa4c" },
"nvim-treesitter": { "branch": "master", "commit": "dc71d94fe223763d28ab49ee3de4fd7081a84891" }, "nvim-treesitter": { "branch": "master", "commit": "b04ccbd0e041bb05f3eef271124da02497d9d10c" },
"nvim-treesitter-context": { "branch": "master", "commit": "ba4289ad345ececd335a9cdd7b9616fd0bb6be92" }, "nvim-treesitter-context": { "branch": "master", "commit": "4fe0a54e86859744968e1a5c7867b49c86855774" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a6382f744f584bbf71d0a563af789af7190aabda" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "a6382f744f584bbf71d0a563af789af7190aabda" },
@ -64,7 +64,7 @@
"vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" }, "vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" },
"vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" },
"vim-wakatime": { "branch": "master", "commit": "5d11a253dd1ecabd4612a885175216032d814300" }, "vim-wakatime": { "branch": "master", "commit": "5d11a253dd1ecabd4612a885175216032d814300" },
"vimtex": { "branch": "master", "commit": "1b4df785a530b7704d081972e438b5678a6d111c" }, "vimtex": { "branch": "master", "commit": "6c01660a99c0cc0906b39094f4a2d086b28fa995" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"yanky.nvim": { "branch": "main", "commit": "7c5cbf0122ff2dfbb6a92f14885894f65949cc8b" } "yanky.nvim": { "branch": "main", "commit": "7c5cbf0122ff2dfbb6a92f14885894f65949cc8b" }
} }

View file

@ -7,6 +7,7 @@ return {
lazy=false, lazy=false,
opts = { opts = {
workspace_text = "The One True Text Editor", workspace_text = "The One True Text Editor",
editing_text = "Hacking %s",
}, },
}, },
{ 'wakatime/vim-wakatime', lazy = false }, { 'wakatime/vim-wakatime', lazy = false },