- Published on
LazyVim Plugins
Coding Blink
The Blink is the blink.cmp plugin, a completion plugin for Neovim. It is a fast and lightweight completion plugin that supports LSP and snippets. It is a good choice for those who want to use a lightweight completion plugin.
In LazyVim, Blink is the default completion plugin. You can use it directly without any configuration. The default configuration for blink.cmp is as follows:
opts = {
snippets = {
expand = function(snippet, _)
return LazyVim.cmp.expand(snippet)
end,
},
appearance = {
-- sets the fallback highlight groups to nvim-cmp's highlight groups
-- useful for when your theme doesn't support blink.cmp
-- will be removed in a future release, assuming themes add support
use_nvim_cmp_as_default = false,
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
},
completion = {
accept = {
-- experimental auto-brackets support
auto_brackets = {
enabled = true,
},
},
menu = {
draw = {
treesitter = { "lsp" },
},
},
documentation = {
auto_show = true,
auto_show_delay_ms = 200,
},
ghost_text = {
enabled = vim.g.ai_cmp,
},
},
-- experimental signature help support
-- signature = { enabled = true },
sources = {
-- adding any nvim-cmp sources here will enable them
-- with blink.compat
compat = {},
default = { "lsp", "path", "snippets", "buffer" },
cmdline = {},
},
keymap = {
preset = "enter",
["<C-y>"] = { "select_and_accept" },
},
}
Based on this plugins, we can to complete the snippets, LSP, path, buffer and cmdline. And the keymap we can configure by ourself habit.
Colorscheme
we think the tokeynight-night
is more beautiful colorscheme for the neovim. So we will to use it as the default colorscheme. Here is the configure:
{
"LazyVim/LazyVim",
opts = {
colorscheme = "tokyonight-night",
},
}
fzf
Editor The Editor core is based on the fzf-lua, which can fuzzy search files, buffers, git files, etc. It is a powerful fuzzy search plugin that can be used to search for files, buffers, git files, etc.
- grep the files by
<space><space>
. - grep context by
<space>sw
- etc.
neo-tree
The neo-tree is the explorer plugin for neovim. It is a file explorer plugin that can be used to explore files and directories. It is a good choice for those who want to use a file explorer plugin. It support to explore the buffer, gitstatus, floder.
- the
<leader>e
is to the floder. - the
<leader>ge
is to the gitstatus. - the
<leader>be
is to the buffer.
which-key
which-key is a plugin that displays the keybindings of the current mode in a popup window. It is a good choice for those who want to see the keybindings of the current mode.
- use the
<leader>sk
to show the keybindings. - on the link have the defualt categories of the key group. e.g.
z
flod,gs
surround. - use hte
<leader>?
to show which key can be used.
Formatter & Linting
Lazyvim use tht conform.nvim
for formatting the code. It is a good choice for those who want to use a code formatter. we can use the mason.nvim
to add the new type files formatter, by the <leader>cm
. The linting is also controlled by the mason.nvim
.
LSP language server protocol
The nvim-lspconfig
is the lazyvim default LSP plugin. which is depended on the mason.nvim
and mason-lspconfig.nvim
.
Treesitter
nvim-treesitter
is a new parser generator tool that we can use in Neovim to power our syntax highlighting and other language processing tasks.
- use the
<C-Space>
andBS
to increment and decrement the selection. - use the
[
or]
add thef
c
a
to navigate the treesitter.
UI
- bufferline - Displays open buffers as tabs at the top of the editor window.
- lualine - A customizable status line that shows at the bottom of the editor.
- noice.nvim - A modern notification system that can be used for debugging and custom notifications.
Utils
- persistence enables session management, allowing quick restoration of previous work sessions.