mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
fix(nvim): LuaSnip auto expand, snack image preview for md
This commit is contained in:
parent
085c2995da
commit
8d0d95420a
8 changed files with 25 additions and 28 deletions
|
|
@ -23,6 +23,7 @@ return {
|
|||
integrations = {
|
||||
-- lualine = true,
|
||||
"lualine",
|
||||
"blink_cmp"
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,11 +1,22 @@
|
|||
return {
|
||||
{ import = "plugins.mod.blink-cmp" },
|
||||
-- { import = "plugins.mod.nvim-cmp" },
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = "~/.config/lsp-snippets" })
|
||||
require("luasnip").setup({
|
||||
history = true,
|
||||
enable_autosnippets = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"js0ny/luasnip-latex-snippets.nvim",
|
||||
dependencies = { "L3MON4D3/LuaSnip", "lervag/vimtex" },
|
||||
ft = { "tex", "latex", "markdown", "org" },
|
||||
opts = {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,25 +8,14 @@ return {
|
|||
{ import = "plugins.lang.lua" },
|
||||
{ import = "plugins.lang.treesitter" },
|
||||
{ import = "plugins.mod.trouble-nvim" },
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
cmd = "Mason",
|
||||
build = ":MasonUpdate",
|
||||
-- opts_extend = { "ensure_installed" },
|
||||
opts = {
|
||||
-- ensure_installed = require("config.servers").servers,
|
||||
},
|
||||
},
|
||||
-- Remove mason and use system package manager
|
||||
-- {
|
||||
-- "williamboman/mason-lspconfig.nvim",
|
||||
-- event = "BufReadPre",
|
||||
-- dependencies = {
|
||||
-- { "williamboman/mason.nvim" },
|
||||
-- { "neovim/nvim-lspconfig" },
|
||||
-- },
|
||||
-- "williamboman/mason.nvim",
|
||||
-- cmd = "Mason",
|
||||
-- build = ":MasonUpdate",
|
||||
-- -- opts_extend = { "ensure_installed" },
|
||||
-- opts = {
|
||||
-- -- ensure_installed = require("config.servers").servers,
|
||||
-- -- automatic_installation = false,
|
||||
-- },
|
||||
-- },
|
||||
{ import = "plugins.mod.conform-nvim" },
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ return {
|
|||
"BufReadPre",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "markdown", "markdown_inline" },
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "markdown", "markdown_inline", "latex" },
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ return {
|
|||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
local servers_module = require("config.servers")
|
||||
local luasnip = require("luasnip")
|
||||
|
|
@ -108,10 +107,5 @@ return {
|
|||
matching = { disallow_symbol_nonprefix_matching = false },
|
||||
})
|
||||
|
||||
-- 配置 LSP
|
||||
for _, server in ipairs(servers) do
|
||||
local config = vim.tbl_deep_extend("force", default_server_config, servers_config[server] or {})
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
end,
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ return {
|
|||
-- scroll = { enabled = true },
|
||||
statuscolumn = { enabled = true },
|
||||
-- words = { enabled = true },
|
||||
image = { enabled = true },
|
||||
image = { enabled = true,
|
||||
img_dirs = { "_Global/Assets" }
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
-- {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue