update to neovim
This commit is contained in:
27
config/nvim/lua/plugins/headlines.lua
Normal file
27
config/nvim/lua/plugins/headlines.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
return {
|
||||||
|
"lukas-reineke/headlines.nvim",
|
||||||
|
opts = function()
|
||||||
|
local opts = {}
|
||||||
|
for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do
|
||||||
|
opts[ft] = {
|
||||||
|
headline_highlights = {},
|
||||||
|
-- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66
|
||||||
|
bullets = {},
|
||||||
|
}
|
||||||
|
for i = 1, 6 do
|
||||||
|
local hl = "Headline" .. i
|
||||||
|
vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true })
|
||||||
|
table.insert(opts[ft].headline_highlights, hl)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
ft = { "markdown", "norg", "rmd", "org" },
|
||||||
|
config = function(_, opts)
|
||||||
|
-- PERF: schedule to prevent headlines slowing down opening a file
|
||||||
|
vim.schedule(function()
|
||||||
|
require("headlines").setup(opts)
|
||||||
|
require("headlines").refresh()
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
18
config/nvim/lua/plugins/markdown-preview.lua
Normal file
18
config/nvim/lua/plugins/markdown-preview.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
return {
|
||||||
|
"iamcco/markdown-preview.nvim",
|
||||||
|
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||||
|
build = function()
|
||||||
|
vim.fn["mkdp#util#install"]()
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>cp",
|
||||||
|
ft = "markdown",
|
||||||
|
"<cmd>MarkdownPreviewToggle<cr>",
|
||||||
|
desc = "Markdown Preview",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.cmd([[do FileType]])
|
||||||
|
end,
|
||||||
|
}
|
||||||
16
config/nvim/lua/plugins/mason.lua
Normal file
16
config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
vim.list_extend(opts.ensure_installed, {
|
||||||
|
"vue-language-server",
|
||||||
|
"biome",
|
||||||
|
"ast-grep",
|
||||||
|
"sqlls",
|
||||||
|
"marksman",
|
||||||
|
"markdownlint",
|
||||||
|
"js-debug-adapter",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
48
config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
48
config/nvim/lua/plugins/nvim-lspconfig.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
return {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
pyright = {},
|
||||||
|
marksman = {},
|
||||||
|
--@type lspconfig.options.tsserver
|
||||||
|
tsserver = {
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>co",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.code_action({
|
||||||
|
apply = true,
|
||||||
|
context = {
|
||||||
|
only = { "source.organizeImports.ts" },
|
||||||
|
diagnostics = {},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
desc = "Organize Imports",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cR",
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.code_action({
|
||||||
|
apply = true,
|
||||||
|
context = {
|
||||||
|
only = { "source.removeUnused.ts" },
|
||||||
|
diagnostics = {},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
desc = "Remove Unused Imports",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
settings = {
|
||||||
|
completions = {
|
||||||
|
completeFunctionCalls = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
4
config/nvim/lua/plugins/nvim-ts-autotag.lua
Normal file
4
config/nvim/lua/plugins/nvim-ts-autotag.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user