make some plugins load lazily
This commit is contained in:
@@ -1,13 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
event = "VimEnter",
|
event = "InsertEnter",
|
||||||
|
|
||||||
-- use a release tag to download pre-built binaries
|
-- use a release tag to download pre-built binaries
|
||||||
version = "1.*",
|
version = "1.*",
|
||||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
|
||||||
-- build = 'cargo build --release',
|
|
||||||
-- If you use nix, you can build from source using latest nightly rust with:
|
|
||||||
-- build = 'nix run .#build-plugin',
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"folke/lazydev.nvim",
|
"folke/lazydev.nvim",
|
||||||
},
|
},
|
||||||
@@ -22,7 +18,6 @@ return {
|
|||||||
nerd_font_variant = "mono",
|
nerd_font_variant = "mono",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- (Default) Only show the documentation popup when manually triggered
|
|
||||||
completion = {
|
completion = {
|
||||||
documentation = { auto_show = true, auto_show_delay_ms = 500, window = { border = "rounded" } },
|
documentation = { auto_show = true, auto_show_delay_ms = 500, window = { border = "rounded" } },
|
||||||
|
|
||||||
@@ -47,11 +42,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
|
||||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
|
||||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
|
||||||
--
|
|
||||||
-- See the fuzzy documentation for more information
|
|
||||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
|
|
||||||
-- Shows a signature help window while you type arguments for a function
|
-- Shows a signature help window while you type arguments for a function
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
|
event = "BufReadPre",
|
||||||
opts = {
|
opts = {
|
||||||
indent = { char = "┊" },
|
indent = { char = "┊" },
|
||||||
whitespace = { highlight = { "Whitespace", "NonText" } },
|
whitespace = { highlight = { "Whitespace", "NonText" } },
|
||||||
|
|||||||
@@ -1,44 +1,23 @@
|
|||||||
return {
|
return {
|
||||||
{
|
"mfussenegger/nvim-lint",
|
||||||
"mfussenegger/nvim-lint",
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
config = function()
|
||||||
config = function()
|
local lint = require "lint"
|
||||||
local lint = require "lint"
|
|
||||||
|
|
||||||
lint.linters_by_ft = {
|
lint.linters_by_ft = {
|
||||||
json = { "jsonlint" },
|
json = { "jsonlint" },
|
||||||
-- typescript = { "eslint" },
|
-- typescript = { "eslint" },
|
||||||
-- typescriptreact = { "eslint" },
|
-- typescriptreact = { "eslint" },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
-- Create autocommand which carries out the actual linting
|
||||||
-- instead set linters_by_ft like this:
|
-- on the specified events.
|
||||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||||
--
|
group = lint_augroup,
|
||||||
-- However, note that this will enable a set of default linters,
|
callback = function()
|
||||||
-- which will cause errors unless these tools are available:
|
require("lint").try_lint()
|
||||||
-- {
|
end,
|
||||||
-- dockerfile = { "hadolint" },
|
})
|
||||||
-- json = { "jsonlint" },
|
end,
|
||||||
-- markdown = { "vale" },
|
|
||||||
-- text = { "vale" }
|
|
||||||
-- }
|
|
||||||
--
|
|
||||||
-- You can disable the default linters by setting their filetypes to nil:
|
|
||||||
-- lint.linters_by_ft['dockerfile'] = nil
|
|
||||||
-- lint.linters_by_ft['json'] = nil
|
|
||||||
-- lint.linters_by_ft['text'] = nil
|
|
||||||
|
|
||||||
-- Create autocommand which carries out the actual linting
|
|
||||||
-- on the specified events.
|
|
||||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
|
||||||
group = lint_augroup,
|
|
||||||
callback = function()
|
|
||||||
require("lint").try_lint()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"davidmh/mdx.nvim",
|
"davidmh/mdx.nvim",
|
||||||
config = true,
|
config = true,
|
||||||
|
ft = "mdx",
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"echasnovski/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local statusline = require "mini.statusline"
|
local statusline = require "mini.statusline"
|
||||||
statusline.setup { use_icons = vim.g.have_nerd_font }
|
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"alexghergh/nvim-tmux-navigation",
|
"alexghergh/nvim-tmux-navigation",
|
||||||
|
|
||||||
lazy = false,
|
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local nvim_tmux_nav = require "nvim-tmux-navigation"
|
local nvim_tmux_nav = require "nvim-tmux-navigation"
|
||||||
|
|
||||||
nvim_tmux_nav.setup {
|
nvim_tmux_nav.setup {
|
||||||
disable_when_zoomed = true,
|
disable_when_zoomed = true,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
event = "VimEnter",
|
event = "BufRead",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
opts = { signs = false },
|
opts = { signs = false },
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user