Nvim: add type annotations to plugin opts

main
Marko Korhonen 6 months ago
parent b3ebda5b51
commit 83cd0a7540
No known key found for this signature in database
GPG Key ID: A7F78BCB859CD890

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

@ -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"

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

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

@ -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,

@ -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 = {

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

@ -3,50 +3,46 @@ return {
build = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"bash",
"css",
"dockerfile",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"html",
"http",
"java",
"javascript",
"json",
"json5",
"latex",
"lua",
"make",
"markdown",
"markdown_inline",
"php",
"python",
"rasi",
"regex",
"rst",
"scss",
"toml",
"tsx",
"typescript",
"vim",
"yaml",
},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = { enable = true },
context_commentstring = { enable = true },
sync_install = true,
ignore_install = {},
auto_install = true,
})
-- vim.wo.foldmethod = 'expr'
-- im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
end,
---@type TSConfig
opts = {
ensure_installed = {
"bash",
"css",
"dockerfile",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"html",
"http",
"java",
"javascript",
"json",
"json5",
"latex",
"lua",
"make",
"markdown",
"markdown_inline",
"php",
"python",
"rasi",
"regex",
"rst",
"scss",
"toml",
"tsx",
"typescript",
"vim",
"yaml",
},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = { enable = true },
context_commentstring = { enable = true },
sync_install = true,
ignore_install = {},
auto_install = true,
},
}

@ -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" },

Loading…
Cancel
Save