mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 06:42:05 +00:00
Update: 2024-11-07
This commit is contained in:
@@ -3,6 +3,7 @@ local M = {}
|
||||
M.setup = function(lsp, capabilities)
|
||||
lsp.tinymist.setup({
|
||||
capabilities = capabilities,
|
||||
offset_encoding = "utf-8",
|
||||
settings = {
|
||||
exportPdf = "onType",
|
||||
outputPath = "$root/target/$dir/$name",
|
||||
@@ -175,7 +175,7 @@ return {
|
||||
require("plugins.lsp.html").setup(lsp, lsp_capabilities)
|
||||
end,
|
||||
tinymist = function()
|
||||
require("plugins.lsp.typst").setup(lsp, lsp_capabilities)
|
||||
require("plugins.lsp.tinymist").setup(lsp, lsp_capabilities)
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -8,7 +8,7 @@ return {
|
||||
javascriptreact = js,
|
||||
typescript = js,
|
||||
typescriptreact = js,
|
||||
python = { "mypy" },
|
||||
-- python = { "mypy" },
|
||||
htmldjango = { "djlint" },
|
||||
html = { "djlint" },
|
||||
lua = { "selene" },
|
||||
|
||||
@@ -4,7 +4,7 @@ return {
|
||||
|
||||
opts = {
|
||||
-- Enabled by default if you do not use `nvim-cmp` set to false
|
||||
enable_cmp = false,
|
||||
enable_cmp = true,
|
||||
-- Endpoint used for getting package versions
|
||||
index_url = "https://pypi.org/simple/",
|
||||
-- Fallback endpoint in case 'index_url' fails to find a package
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
return {
|
||||
"rest-nvim/rest.nvim",
|
||||
cmd = { "Rest" },
|
||||
}
|
||||
@@ -2,6 +2,19 @@ return {
|
||||
"chomosuke/typst-preview.nvim",
|
||||
ft = "typst",
|
||||
version = "*",
|
||||
keys = {
|
||||
{ "<leader>ot", vim.cmd.TypstPreviewToggle, desc = "Toggle Typst Preview" },
|
||||
},
|
||||
cmd = {
|
||||
"TypstPreviewUpdate",
|
||||
"TypstPreview",
|
||||
"TypstPreviewStop",
|
||||
"TypstPreviewToggle",
|
||||
"TypstPreviewFollowCursor",
|
||||
"TypstPreviewNoFollowCursor",
|
||||
"TypstPreviewFollowCursorToggle",
|
||||
"TypstPreviewSyncCursor",
|
||||
},
|
||||
build = function()
|
||||
require("typst-preview").update()
|
||||
end,
|
||||
@@ -11,7 +24,7 @@ return {
|
||||
|
||||
-- Custom format string to open the output link provided with %s
|
||||
-- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview'
|
||||
open_cmd = nil,
|
||||
open_cmd = "xdg-open %s",
|
||||
|
||||
-- Setting this to 'always' will invert black and white in the preview
|
||||
-- Setting this to 'auto' will invert depending if the browser has enable
|
||||
@@ -26,7 +39,7 @@ return {
|
||||
-- required.
|
||||
dependencies_bin = {
|
||||
-- if you are using tinymist, just set ['typst-preview'] = "tinymist".
|
||||
["typst-preview"] = "tinymist",
|
||||
["typst-preview"] = nil,
|
||||
["websocat"] = nil,
|
||||
},
|
||||
-- A list of extra arguments (or nil) to be passed to previewer.
|
||||
|
||||
@@ -109,3 +109,23 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
--[[ local function setup_soft_wrap()
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.linebreak = true
|
||||
vim.opt_local.columns = 85
|
||||
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
buffer = 0,
|
||||
callback = function()
|
||||
if vim.opt.columns:get() > 85 then
|
||||
vim.opt.columns = 85
|
||||
end
|
||||
end,
|
||||
})
|
||||
vim.opt_local.colorcolumn = "80"
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "markdown", "norg", "typst", "tex" },
|
||||
callback = setup_soft_wrap,
|
||||
}) ]]
|
||||
|
||||
@@ -52,7 +52,6 @@ vim.opt.updatetime = 50 -- faster completion (4000ms default)
|
||||
vim.opt.whichwrap:append("<,>,[,],h,l")
|
||||
vim.opt.wrap = false -- display lines as one long line
|
||||
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edit
|
||||
|
||||
vim.opt_local.path:prepend(vim.fn.stdpath("config") .. "/lua")
|
||||
vim.opt_local.suffixesadd:prepend(".lua")
|
||||
vim.opt_local.suffixesadd:prepend("init.lua")
|
||||
|
||||
Reference in New Issue
Block a user