Nvim: add type annotations to plugin opts
This commit is contained in:
parent
b3ebda5b51
commit
83cd0a7540
9 changed files with 50 additions and 58 deletions
|
@ -2,6 +2,7 @@ return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
version = "*",
|
version = "*",
|
||||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||||
|
---@type BufferlineConfig
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
|
|
|
@ -25,10 +25,6 @@ return {
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
if not cmp then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Set completeopt to have a better completion experience
|
-- Set completeopt to have a better completion experience
|
||||||
vim.o.completeopt = "menuone,noselect"
|
vim.o.completeopt = "menuone,noselect"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
-- Indent characters
|
-- Indent characters
|
||||||
return {
|
return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
---@type ibl.config
|
||||||
opts = {
|
opts = {
|
||||||
exclude = {
|
exclude = {
|
||||||
filetypes = {
|
filetypes = {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
-- Colorscheme
|
-- Colorscheme
|
||||||
return {
|
return {
|
||||||
"rebelot/kanagawa.nvim",
|
"rebelot/kanagawa.nvim",
|
||||||
|
---@type KanagawaConfig
|
||||||
opts = {
|
opts = {
|
||||||
compile = true,
|
compile = true,
|
||||||
dimInactive = true,
|
dimInactive = true,
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
return {
|
return {
|
||||||
"sbdchd/neoformat",
|
"sbdchd/neoformat",
|
||||||
config = function()
|
config = function()
|
||||||
local wk = require("which-key")
|
require("which-key").register({
|
||||||
wk.register({
|
|
||||||
f = { "<cmd>Neoformat<CR>", "Format with Neoformat" },
|
f = { "<cmd>Neoformat<CR>", "Format with Neoformat" },
|
||||||
}, { prefix = "<leader>" })
|
}, { prefix = "<leader>" })
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -4,6 +4,7 @@ return {
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
|
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
|
||||||
|
---@type NoiceConfig
|
||||||
opts = {
|
opts = {
|
||||||
lsp = {
|
lsp = {
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
|
@ -19,8 +20,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local noice = require("noice")
|
require("noice").setup(opts)
|
||||||
noice.setup(opts)
|
|
||||||
|
|
||||||
require("which-key").register({
|
require("which-key").register({
|
||||||
d = {
|
d = {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
-- High performance color highlighter
|
-- High performance color highlighter
|
||||||
return {
|
return {
|
||||||
"norcalli/nvim-colorizer.lua",
|
"norcalli/nvim-colorizer.lua",
|
||||||
config = function()
|
config = true,
|
||||||
require("colorizer").setup()
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ return {
|
||||||
build = function()
|
build = function()
|
||||||
require("nvim-treesitter.install").update({ with_sync = true })
|
require("nvim-treesitter.install").update({ with_sync = true })
|
||||||
end,
|
end,
|
||||||
config = function()
|
---@type TSConfig
|
||||||
require("nvim-treesitter.configs").setup({
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"bash",
|
"bash",
|
||||||
"css",
|
"css",
|
||||||
|
@ -44,9 +44,5 @@ return {
|
||||||
sync_install = true,
|
sync_install = true,
|
||||||
ignore_install = {},
|
ignore_install = {},
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- vim.wo.foldmethod = 'expr'
|
|
||||||
-- im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.setup({})
|
wk.setup()
|
||||||
|
|
||||||
wk.register({
|
wk.register({
|
||||||
h = { "<cmd>nohlsearch<CR>", "Turn off search highlight" },
|
h = { "<cmd>nohlsearch<CR>", "Turn off search highlight" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue