fix(nvim): LuaSnip auto expand, snack image preview for md

This commit is contained in:
js0ny 2025-04-13 17:11:04 +01:00
parent 085c2995da
commit 8d0d95420a
8 changed files with 25 additions and 28 deletions

View file

@ -1,12 +1,12 @@
[linux]
systemd:
{{LN}} {{DOTFILES}}/platforms/{{OS}}/systemd {{XDG_CONFIG_HOME}}/systemd/
{{LN}} {{DOTFILES}}/platforms/{{OS}}/systemd {{XDG_CONFIG_HOME}}/systemd
[linux]
keyd:
-which keyd || sudo pacman -S keyd --noconfirm || sudo apt install keyd --yes || @just build_keyd
sudo cp {{DOTFILES}}/platforms/linux/keyd/keyd.conf /etc/keyd/default.conf
sudo cp {{DOTFILES}}/platforms/linux/keyd/default.conf /etc/keyd/default.conf
mkdir -p {{XDG_CONFIG_HOME}}/keyd
{{LN}} {{DOTFILES}}/platforms/linux/keyd/app.conf {{XDG_CONFIG_HOME}}/keyd/app.conf
sudo systemctl enable --now keyd.service

View file

@ -4,7 +4,7 @@ Documentation=man:keyd-application-mapper(1) https://github.com/rvaiya/keyd
[Service]
Type=forking
ExecStart=/usr/bin/keyd-application-mapper -d
ExecStart=/usr/local/bin/keyd-application-mapper -d
ExecStop=pkill keyd-applicatio
Restart=on-failure

View file

@ -23,6 +23,7 @@ return {
integrations = {
-- lualine = true,
"lualine",
"blink_cmp"
},
},
},

View file

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

View file

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

View file

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

View file

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

View file

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