docs(readme): add configuration index with plugin links and line references
This commit is contained in:
parent
3338d39206
commit
87b3522b1a
29
README.md
29
README.md
|
@ -150,6 +150,35 @@ examples of adding popularly requested plugins.
|
||||||
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
||||||
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
||||||
|
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
This section provides quick links to the configuration of each plugin.
|
||||||
|
|
||||||
|
### Plugins configured in `init.lua`
|
||||||
|
|
||||||
|
- [guess-indent.nvim](init.lua#L250)
|
||||||
|
- [gitsigns.nvim](init.lua#L275)
|
||||||
|
- [which-key.nvim](init.lua#L302)
|
||||||
|
- [telescope.nvim](init.lua#L362)
|
||||||
|
- [lazydev.nvim](init.lua#L469)
|
||||||
|
- [nvim-lspconfig](init.lua#L480)
|
||||||
|
- [conform.nvim](init.lua#L762)
|
||||||
|
- [blink.cmp](init.lua#L803)
|
||||||
|
- [tokyonight.nvim](init.lua#L906)
|
||||||
|
- [todo-comments.nvim](init.lua#L924)
|
||||||
|
- [mini.nvim](init.lua#L927)
|
||||||
|
- [nvim-treesitter](init.lua#L964)
|
||||||
|
|
||||||
|
### Plugins with dedicated configuration files
|
||||||
|
|
||||||
|
- [autopairs.lua](lua/kickstart/plugins/autopairs.lua)
|
||||||
|
- [debug.lua](lua/kickstart/plugins/debug.lua)
|
||||||
|
- [gitsigns.lua](lua/kickstart/plugins/gitsigns.lua)
|
||||||
|
- [indent_line.lua](lua/kickstart/plugins/indent_line.lua)
|
||||||
|
- [lint.lua](lua/kickstart/plugins/lint.lua)
|
||||||
|
- [neo-tree.lua](lua/kickstart/plugins/neo-tree.lua)
|
||||||
|
|
||||||
### Install Recipes
|
### Install Recipes
|
||||||
|
|
||||||
Below you can find OS specific install instructions for Neovim and dependencies.
|
Below you can find OS specific install instructions for Neovim and dependencies.
|
||||||
|
|
74
init.lua
74
init.lua
|
@ -628,32 +628,54 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- Diagnostic Config
|
-- Diagnostic Config
|
||||||
-- See :help vim.diagnostic.Opts
|
-- See :help vim.diagnostic.Opts
|
||||||
vim.diagnostic.config {
|
-- Diagnostic configuration similar to VS Code's Error Lens.
|
||||||
severity_sort = true,
|
-- In insert mode, diagnostics are displayed as inline virtual text.
|
||||||
float = { border = 'rounded', source = 'if_many' },
|
-- In normal mode, diagnostics are shown as virtual lines below the affected lines.
|
||||||
underline = { severity = vim.diagnostic.severity.ERROR },
|
|
||||||
signs = vim.g.have_nerd_font and {
|
local function set_virtual_text(enable)
|
||||||
text = {
|
local diagnostic_icons = {
|
||||||
[vim.diagnostic.severity.ERROR] = ' ',
|
[vim.diagnostic.severity.ERROR] = ' ',
|
||||||
[vim.diagnostic.severity.WARN] = ' ',
|
[vim.diagnostic.severity.WARN] = ' ',
|
||||||
[vim.diagnostic.severity.INFO] = ' ',
|
[vim.diagnostic.severity.INFO] = ' ',
|
||||||
[vim.diagnostic.severity.HINT] = ' ',
|
[vim.diagnostic.severity.HINT] = ' ',
|
||||||
},
|
}
|
||||||
} or {},
|
|
||||||
virtual_text = {
|
vim.diagnostic.config {
|
||||||
source = 'if_many',
|
update_in_insert = true, -- error messages in insert mode
|
||||||
spacing = 2,
|
severity_sort = true,
|
||||||
format = function(diagnostic)
|
float = { border = 'rounded', source = 'if_many' },
|
||||||
local diagnostic_message = {
|
underline = { severity = vim.diagnostic.severity.ERROR },
|
||||||
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
signs = vim.g.have_nerd_font and {
|
||||||
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
text = diagnostic_icons,
|
||||||
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
} or {},
|
||||||
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
|
||||||
}
|
virtual_lines = not enable and {
|
||||||
return diagnostic_message[diagnostic.severity]
|
format = function(diagnostic)
|
||||||
end,
|
return (diagnostic_icons[diagnostic.severity] or '') .. diagnostic.message
|
||||||
},
|
end,
|
||||||
}
|
} or false,
|
||||||
|
|
||||||
|
virtual_text = enable and {
|
||||||
|
source = 'if_many',
|
||||||
|
spacing = 2,
|
||||||
|
format = function(diagnostic)
|
||||||
|
return (diagnostic_icons[diagnostic.severity] or '') .. diagnostic.message
|
||||||
|
end,
|
||||||
|
} or false,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('InsertEnter', {
|
||||||
|
callback = function()
|
||||||
|
set_virtual_text(true)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('InsertLeave', {
|
||||||
|
callback = function()
|
||||||
|
set_virtual_text(false)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||||
|
|
Loading…
Reference in New Issue