add readme and yaml spec
This commit is contained in:
15
docs/README.md
Normal file
15
docs/README.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# New Spec
|
||||||
|
|
||||||
|
For new LSP, add in `lua/modules/language-specs.lua` at `lsp = <name>`.
|
||||||
|
Name should match the mason registry one at: `https://github.com/mason-org/mason-registry/tree/main/packages`
|
||||||
|
|
||||||
|
1. Run `nvim --headless +InstallAll +qa` (it invalidates cache automatically)
|
||||||
|
2. Run ` nvim --headless +FetchLspConfigs +qa` -> It will download the nvim-lspconfig variant in `lsp/`
|
||||||
|
|
||||||
|
You may need to run: `pkill prettierd` (as it is running in background)
|
||||||
|
|
||||||
|
# Other commands
|
||||||
|
|
||||||
|
```
|
||||||
|
nvim --headless +Sync +qa # For packages/plugins
|
||||||
|
```
|
||||||
143
docs/docs.md
143
docs/docs.md
@@ -1,13 +1,3 @@
|
|||||||
TODO:
|
|
||||||
- wrap up invero theme in separate repo and proper colors?
|
|
||||||
- check plugins logins
|
|
||||||
- cache / create final result
|
|
||||||
- simplify coding: ts, lsp, lint, format (check other repos)
|
|
||||||
- how to download parsers and plugins alternative
|
|
||||||
- telescope alternative
|
|
||||||
- keymaps
|
|
||||||
- wrap up everything
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
--[[
|
--[[
|
||||||
Neovim Lua config: ways to set things
|
Neovim Lua config: ways to set things
|
||||||
@@ -31,121 +21,125 @@ TODO:
|
|||||||
## check macos fileS: https://github.com/dsully/dotfiles/blob/main/.data/macos-defaults/globals.yaml
|
## check macos fileS: https://github.com/dsully/dotfiles/blob/main/.data/macos-defaults/globals.yaml
|
||||||
|
|
||||||
# Used pacakges:
|
# Used pacakges:
|
||||||
- rockspaces Metadata files describing how to build and install a Lua package.
|
|
||||||
- luarocks Package manager for Lua modules. (optional)
|
|
||||||
- tree-sitter Parser generator. Not needed except for using CLI. (optional)
|
|
||||||
|
|
||||||
- fd-find (fd) Alternative to `find`. (optional)
|
- rockspaces Metadata files describing how to build and install a Lua package.
|
||||||
- ripgrep (rg) Line-oriented search tool. (recommended)
|
- luarocks Package manager for Lua modules. (optional)
|
||||||
|
- tree-sitter Parser generator. Not needed except for using CLI. (optional)
|
||||||
|
|
||||||
- git Revision control system. (requirement)
|
- fd-find (fd) Alternative to `find`. (optional)
|
||||||
- lazygit Terminal UI for git commands. (optional)
|
- ripgrep (rg) Line-oriented search tool. (recommended)
|
||||||
|
|
||||||
- fzf Command-line fuzzy finder.
|
- git Revision control system. (requirement)
|
||||||
- bat "cat" but with colors
|
- lazygit Terminal UI for git commands. (optional)
|
||||||
- curl Command-line for transferring data specified with URL syntax.
|
|
||||||
- wget Utility for downloading files from the Web.
|
- fzf Command-line fuzzy finder.
|
||||||
|
- bat "cat" but with colors
|
||||||
|
- curl Command-line for transferring data specified with URL syntax.
|
||||||
|
- wget Utility for downloading files from the Web.
|
||||||
- make
|
- make
|
||||||
- cc Collection of compilers.
|
- cc Collection of compilers.
|
||||||
- build-essential Meta-package that installs standard C/C++ libraries and headers.
|
- build-essential Meta-package that installs standard C/C++ libraries and headers.
|
||||||
These are needed to compile tree-sitter parsers. Run only on the first time.
|
These are needed to compile tree-sitter parsers. Run only on the first time.
|
||||||
cc (gcc, clang) C compiler. Usually it points to `clang` (on macos) or `gcc` (on linux).
|
cc (gcc, clang) C compiler. Usually it points to `clang` (on macos) or `gcc` (on linux).
|
||||||
g++ C++ compiler.
|
g++ C++ compiler.
|
||||||
make Build automation tool from source code.
|
make Build automation tool from source code.
|
||||||
|
|
||||||
- unzip Extraction utility for archives compressed in .zip.
|
- unzip Extraction utility for archives compressed in .zip.
|
||||||
- ca-certificates Provides a set of trusted Certificate Authority (CA) certificates.
|
- ca-certificates Provides a set of trusted Certificate Authority (CA) certificates.
|
||||||
- openssh-client Tools for connecting to remote servers securely over SSH.
|
- openssh-client Tools for connecting to remote servers securely over SSH.
|
||||||
- libssl-dev Development libraries and headers for OpenSSL.
|
- libssl-dev Development libraries and headers for OpenSSL.
|
||||||
- sudo
|
- sudo
|
||||||
- tree
|
- tree
|
||||||
- jq
|
- jq
|
||||||
- man-db
|
- man-db
|
||||||
- python3
|
- python3
|
||||||
- volta Node manager
|
- volta Node manager
|
||||||
- ncurses ncurses-dev ncurses-libs ncurses-terminfo \
|
- ncurses ncurses-dev ncurses-libs ncurses-terminfo \
|
||||||
- check: https://github.com/glepnir/nvim/blob/main/Dockerfile
|
- check: https://github.com/glepnir/nvim/blob/main/Dockerfile
|
||||||
|
|
||||||
|
|
||||||
# Currently installed
|
# Currently installed
|
||||||
|
|
||||||
- plenary.nvim
|
- plenary.nvim
|
||||||
- lazy.nvim
|
- lazy.nvim
|
||||||
|
|
||||||
- nvim-treesitter
|
- nvim-treesitter
|
||||||
- neovim/nvim-lspconfig
|
- neovim/nvim-lspconfig
|
||||||
- williamboman/mason.nvim
|
- williamboman/mason.nvim
|
||||||
- williamboman/mason-lspconfig.nvim
|
- williamboman/mason-lspconfig.nvim
|
||||||
- j-hui/fidget.nvim
|
- j-hui/fidget.nvim
|
||||||
- hrsh7th/cmp-nvim-lsp
|
- hrsh7th/cmp-nvim-lsp
|
||||||
- b0o/schemastore.nvim
|
- b0o/schemastore.nvim
|
||||||
|
|
||||||
- windwp/nvim-ts-autotag # auto close,rename tags
|
- windwp/nvim-ts-autotag # auto close,rename tags
|
||||||
- nvim-autopairs # auto pair chars
|
- nvim-autopairs # auto pair chars
|
||||||
- stevearc/conform.nvim # formatter
|
- stevearc/conform.nvim # formatter
|
||||||
- nvim-cmp # completion
|
- nvim-cmp # completion
|
||||||
- cmp-path
|
- cmp-path
|
||||||
- cmp-nvim-lsp
|
- cmp-nvim-lsp
|
||||||
|
|
||||||
- nvim-tree.lua # file explorer
|
- nvim-tree.lua # file explorer
|
||||||
- telescope.nvim
|
- telescope.nvim
|
||||||
- telescope-fzf-native.nvim
|
- telescope-fzf-native.nvim
|
||||||
- telescope-ui-select.nvim
|
- telescope-ui-select.nvim
|
||||||
- plenary.nvim
|
- plenary.nvim
|
||||||
- harpoon # tags
|
- harpoon # tags
|
||||||
|
|
||||||
|
|
||||||
# Notes:
|
# Notes:
|
||||||
|
|
||||||
- in lsp change tsserver to vtsls
|
- in lsp change tsserver to vtsls
|
||||||
|
|
||||||
# New package definition
|
# New package definition
|
||||||
- Plugin and Package managers
|
|
||||||
- folke/lazy.nvim
|
|
||||||
- mason-org/mason.nvim
|
|
||||||
- TS
|
|
||||||
- nvim-treesitter
|
|
||||||
- nvim-treesitter-textobjects
|
|
||||||
- LSP
|
|
||||||
- neovim/nvim-lspconfig
|
|
||||||
|
|
||||||
- nvim-ts-autotag tag elements (`</>`)
|
- Plugin and Package managers
|
||||||
- windwp/nvim-autopairs auto pairs
|
- folke/lazy.nvim
|
||||||
- blink.cmp autocompletion
|
- mason-org/mason.nvim
|
||||||
- stevearc/conform.nvim autoformat
|
- TS
|
||||||
- mini.ai `a/i` motions
|
- nvim-treesitter
|
||||||
|
- nvim-treesitter-textobjects
|
||||||
|
- LSP
|
||||||
|
- neovim/nvim-lspconfig
|
||||||
|
- nvim-ts-autotag tag elements (`</>`)
|
||||||
|
- windwp/nvim-autopairs auto pairs
|
||||||
|
- blink.cmp autocompletion
|
||||||
|
- stevearc/conform.nvim autoformat
|
||||||
|
- mini.ai `a/i` motions
|
||||||
- mini.pairs
|
- mini.pairs
|
||||||
- mini.surround
|
- mini.surround
|
||||||
- mfussenegger/nvim-lint
|
- mfussenegger/nvim-lint
|
||||||
- nvim-lspconfig
|
- nvim-lspconfig
|
||||||
- fzf-lua (replace telescope)
|
- fzf-lua (replace telescope)
|
||||||
- ? indent guides
|
- ? indent guides
|
||||||
- lukas-reineke/indent-blankline.nvim
|
- lukas-reineke/indent-blankline.nvim
|
||||||
- snacks.indent
|
- snacks.indent
|
||||||
- mini.indentscope
|
- mini.indentscope
|
||||||
|
|
||||||
## Deps:
|
## Deps:
|
||||||
|
|
||||||
- SchemaStore.nvim
|
- SchemaStore.nvim
|
||||||
- mason-lspconfig.nvim
|
- mason-lspconfig.nvim
|
||||||
- mason.nvim
|
- mason.nvim
|
||||||
|
|
||||||
## Maybe:
|
## Maybe:
|
||||||
- folke/ts-comments.nvim better comments
|
|
||||||
- grug-far.nvim find and replace
|
- folke/ts-comments.nvim better comments
|
||||||
- markdown-preview.nvim side by side md (disabled in folke)
|
- grug-far.nvim find and replace
|
||||||
- toppair/peek.nvim another markdown preview?
|
- markdown-preview.nvim side by side md (disabled in folke)
|
||||||
- render-markdown.nvim inline viewer
|
- toppair/peek.nvim another markdown preview?
|
||||||
|
- render-markdown.nvim inline viewer
|
||||||
- markview.nvim
|
- markview.nvim
|
||||||
- diffview.nvim
|
- diffview.nvim
|
||||||
- octo.nvim edit and review GH issues and pr
|
- octo.nvim edit and review GH issues and pr
|
||||||
- yanky.nvim better yank+put. has history
|
- yanky.nvim better yank+put. has history
|
||||||
- inc-rename.nvim LSP renaming with visual feedback
|
- inc-rename.nvim LSP renaming with visual feedback
|
||||||
- mini.basics defaults options
|
- mini.basics defaults options
|
||||||
- mini.test run tests under cursor
|
- mini.test run tests under cursor
|
||||||
- mini.diff inline diff
|
- mini.diff inline diff
|
||||||
- mini.hipatters hilight patters and hex colors
|
- mini.hipatters hilight patters and hex colors
|
||||||
- mini.move move chunks (like vscode)
|
- mini.move move chunks (like vscode)
|
||||||
- undo tree (find a plugin)
|
- undo tree (find a plugin)
|
||||||
|
|
||||||
## AI help
|
## AI help
|
||||||
|
|
||||||
- jackMort/ChatGPT.nvim
|
- jackMort/ChatGPT.nvim
|
||||||
- MunifTanjim/nui.nvim (dep)
|
- MunifTanjim/nui.nvim (dep)
|
||||||
- nvim-lua/plenary.nvim (dep)
|
- nvim-lua/plenary.nvim (dep)
|
||||||
@@ -155,6 +149,7 @@ TODO:
|
|||||||
- milanglacier/minuet-ai.nvim (folke)
|
- milanglacier/minuet-ai.nvim (folke)
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
opt.backup = true
|
opt.backup = true
|
||||||
@@ -178,6 +173,7 @@ vim.keymap.set("n", "<C-c>", "ciw")
|
|||||||
```
|
```
|
||||||
|
|
||||||
folke cmd
|
folke cmd
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- show cursor line only in active window
|
-- show cursor line only in active window
|
||||||
vim.api.nvim_create_autocmd({ "InsertLeave", "WinEnter" }, {
|
vim.api.nvim_create_autocmd({ "InsertLeave", "WinEnter" }, {
|
||||||
@@ -210,6 +206,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
|
|||||||
```
|
```
|
||||||
|
|
||||||
Enable folding with TS:
|
Enable folding with TS:
|
||||||
|
|
||||||
```
|
```
|
||||||
vim.opt.foldmethod = "expr"
|
vim.opt.foldmethod = "expr"
|
||||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
|||||||
@@ -2,22 +2,28 @@ local M = {}
|
|||||||
|
|
||||||
function M.get()
|
function M.get()
|
||||||
return {
|
return {
|
||||||
{ ts = { 'yaml', 'toml', 'sql', 'diff', 'dockerfile', 'gitcommit', 'gitignore' } },
|
{
|
||||||
{ ts = { 'c', 'cpp', 'go', 'rust', 'python' } },
|
ft = 'yaml',
|
||||||
|
ts = 'yaml',
|
||||||
|
lsp = 'yaml-language-server',
|
||||||
|
format = { 'prettierd', 'prettier' },
|
||||||
|
},
|
||||||
|
{ ts = { 'yaml', 'toml', 'sql', 'diff', 'dockerfile', 'gitcommit', 'gitignore' } },
|
||||||
|
{ ts = { 'c', 'cpp', 'go', 'rust', 'python' } },
|
||||||
|
|
||||||
{ ft = 'markdown', ts = { 'markdown', 'markdown_inline' }, format = 'prettier' },
|
{ ft = 'markdown', ts = { 'markdown', 'markdown_inline' }, format = 'prettier' },
|
||||||
{ ft = 'bash', lsp = 'bash-language-server', lint = 'shellcheck', format = 'shfmt' },
|
{ ft = 'bash', lsp = 'bash-language-server', lint = 'shellcheck', format = 'shfmt' },
|
||||||
{ ft = 'lua', lsp = 'lua-language-server', lint = 'luacheck', format = 'stylua' },
|
{ ft = 'lua', lsp = 'lua-language-server', lint = 'luacheck', format = 'stylua' },
|
||||||
{ ft = { 'json', 'jsonc' }, lsp = 'json-lsp' },
|
{ ft = { 'json', 'jsonc' }, lsp = 'json-lsp' },
|
||||||
{ ft = 'html', lsp = 'html-lsp' },
|
{ ft = 'html', lsp = 'html-lsp' },
|
||||||
{ ft = 'css', lsp = { 'css-lsp', 'tailwindcss-language-server' } },
|
{ ft = 'css', lsp = { 'css-lsp', 'tailwindcss-language-server' } },
|
||||||
{
|
{
|
||||||
ft = { 'javascript', 'typescript', 'javascriptreact', 'typescriptreact' },
|
ft = { 'javascript', 'typescript', 'javascriptreact', 'typescriptreact' },
|
||||||
ts = { 'javascript', 'typescript', 'tsx' },
|
ts = { 'javascript', 'typescript', 'tsx' },
|
||||||
lsp = { 'vtsls', 'eslint-lsp' },
|
lsp = { 'vtsls', 'eslint-lsp' },
|
||||||
format = { 'prettierd', 'prettier' },
|
format = { 'prettierd', 'prettier' },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ vim.api.nvim_create_user_command('Sync', function()
|
|||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command('FetchLspConfigs', function()
|
vim.api.nvim_create_user_command('FetchLspConfigs', function()
|
||||||
local base_url = 'https://raw.githubusercontent.com/neovim/nvim-lspconfig/master/lsp/'
|
-- local base_url = 'https://raw.githubusercontent.com/neovim/nvim-lspconfig/master/lsp/'
|
||||||
|
local base_url = 'https://raw.githubusercontent.com/neovim/nvim-lspconfig/refs/heads/master/lsp/'
|
||||||
|
|
||||||
local lm = require('plugins.language-manager')
|
local lm = require('plugins.language-manager')
|
||||||
lm.invalidate_cache()
|
lm.invalidate_cache()
|
||||||
|
|||||||
Reference in New Issue
Block a user