Nvim: add type annotations to plugin opts

This commit is contained in:
Marko Korhonen 2023-11-21 22:28:54 +02:00
parent 26d0dae2fc
commit b5498c671d
9 changed files with 50 additions and 58 deletions

View file

@ -2,6 +2,7 @@ return {
"akinsho/bufferline.nvim",
version = "*",
dependencies = { "kyazdani42/nvim-web-devicons" },
---@type BufferlineConfig
opts = {
options = {
diagnostics = "nvim_lsp",

View file

@ -25,10 +25,6 @@ return {
local cmp = require("cmp")
local luasnip = require("luasnip")
if not cmp then
return
end
-- Set completeopt to have a better completion experience
vim.o.completeopt = "menuone,noselect"

View file

@ -1,6 +1,7 @@
-- Indent characters
return {
"lukas-reineke/indent-blankline.nvim",
---@type ibl.config
opts = {
exclude = {
filetypes = {

View file

@ -1,6 +1,7 @@
-- Colorscheme
return {
"rebelot/kanagawa.nvim",
---@type KanagawaConfig
opts = {
compile = true,
dimInactive = true,

View file

@ -2,8 +2,7 @@
return {
"sbdchd/neoformat",
config = function()
local wk = require("which-key")
wk.register({
require("which-key").register({
f = { "<cmd>Neoformat<CR>", "Format with Neoformat" },
}, { prefix = "<leader>" })
end,

View file

@ -4,6 +4,7 @@ return {
"folke/noice.nvim",
event = "VeryLazy",
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
---@type NoiceConfig
opts = {
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
@ -19,8 +20,7 @@ return {
},
},
config = function(_, opts)
local noice = require("noice")
noice.setup(opts)
require("noice").setup(opts)
require("which-key").register({
d = {

View file

@ -1,7 +1,5 @@
-- High performance color highlighter
return {
"norcalli/nvim-colorizer.lua",
config = function()
require("colorizer").setup()
end,
config = true,
}

View file

@ -3,8 +3,8 @@ return {
build = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
config = function()
require("nvim-treesitter.configs").setup({
---@type TSConfig
opts = {
ensure_installed = {
"bash",
"css",
@ -44,9 +44,5 @@ return {
sync_install = true,
ignore_install = {},
auto_install = true,
})
-- vim.wo.foldmethod = 'expr'
-- im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
end,
},
}

View file

@ -4,7 +4,7 @@ return {
"folke/which-key.nvim",
config = function()
local wk = require("which-key")
wk.setup({})
wk.setup()
wk.register({
h = { "<cmd>nohlsearch<CR>", "Turn off search highlight" },