Compare commits
2 Commits
d68a536a91
...
0764d4d754
Author | SHA1 | Date | |
---|---|---|---|
0764d4d754 | |||
20e00625b8 |
|
@ -33,6 +33,34 @@ if not configs.elixirls then
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- typst-lsp
|
||||||
|
|
||||||
|
if not configs.typst_lsp then
|
||||||
|
configs.typst_lsp = {
|
||||||
|
default_config = {
|
||||||
|
cmd = { 'typst-lsp' },
|
||||||
|
filetypes = { 'typst' },
|
||||||
|
single_file_support = true,
|
||||||
|
root_dir = function(fname)
|
||||||
|
return nvim_lsp.util.find_git_ancestor(fname)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
docs = {
|
||||||
|
description = [[
|
||||||
|
https://github.com/nvarner/typst-lsp
|
||||||
|
|
||||||
|
Language server for Typst.
|
||||||
|
]],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
require 'lspconfig'.typst_lsp.setup {
|
||||||
|
settings = {
|
||||||
|
exportPdf = "onSave",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- keybindings
|
-- keybindings
|
||||||
|
|
||||||
local on_attach = function(client, bufrn)
|
local on_attach = function(client, bufrn)
|
||||||
|
@ -90,6 +118,7 @@ local servers = {
|
||||||
-- 'denols',
|
-- 'denols',
|
||||||
'clangd',
|
'clangd',
|
||||||
'zls',
|
'zls',
|
||||||
|
'typst-lsp',
|
||||||
}
|
}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
|
|
|
@ -40,3 +40,18 @@ parser_config.hare = {
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.treesitter.language.register('hare', 'hare')
|
vim.treesitter.language.register('hare', 'hare')
|
||||||
|
|
||||||
|
-- typst syntax
|
||||||
|
-- parser_config.typst = {
|
||||||
|
-- install_info = {
|
||||||
|
-- url = "~/code/typst/tree-sitter-typst", -- local path or git repo
|
||||||
|
-- files = {"src/parser.c", "src/scanner.cc"}, -- note that some parsers also require src/scanner.c or src/scanner.cc
|
||||||
|
-- -- optional entries:
|
||||||
|
-- -- branch = "main", -- default branch in case of git repo if different from master
|
||||||
|
-- generate_requires_npm = true, -- if stand-alone parser without npm dependencies
|
||||||
|
-- requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
|
||||||
|
-- },
|
||||||
|
-- filetype = "typ", -- if filetype does not match the parser name
|
||||||
|
-- }
|
||||||
|
--
|
||||||
|
-- vim.treesitter.language.register('typst', 'typ')
|
||||||
|
|
|
@ -148,6 +148,10 @@ local function init()
|
||||||
|
|
||||||
-- RFC browser
|
-- RFC browser
|
||||||
use 'mhinz/vim-rfc'
|
use 'mhinz/vim-rfc'
|
||||||
|
|
||||||
|
-- typst
|
||||||
|
use 'kaarmu/typst.vim'
|
||||||
|
use 'nvarner/typst-lsp'
|
||||||
end
|
end
|
||||||
|
|
||||||
local plugins = setmetatable({}, {
|
local plugins = setmetatable({}, {
|
||||||
|
|
|
@ -49,8 +49,8 @@ local function save_profiles(threshold)
|
||||||
end
|
end
|
||||||
|
|
||||||
time([[Luarocks path setup]], true)
|
time([[Luarocks path setup]], true)
|
||||||
local package_path_str = "/home/leo/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/leo/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/leo/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/leo/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
local package_path_str = "/home/leo/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?.lua;/home/leo/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?/init.lua;/home/leo/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?.lua;/home/leo/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?/init.lua"
|
||||||
local install_cpath_pattern = "/home/leo/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
local install_cpath_pattern = "/home/leo/.cache/nvim/packer_hererocks/2.1.1702233742/lib/lua/5.1/?.so"
|
||||||
if not string.find(package.path, package_path_str, 1, true) then
|
if not string.find(package.path, package_path_str, 1, true) then
|
||||||
package.path = package.path .. ';' .. package_path_str
|
package.path = package.path .. ';' .. package_path_str
|
||||||
end
|
end
|
||||||
|
@ -208,7 +208,7 @@ _G.packer_plugins = {
|
||||||
url = "https://github.com/ahmedkhalf/project.nvim"
|
url = "https://github.com/ahmedkhalf/project.nvim"
|
||||||
},
|
},
|
||||||
["ssr.nvim"] = {
|
["ssr.nvim"] = {
|
||||||
config = { "\27LJ\2\nŸ\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\fkeymaps\1\0\4\16replace_all\17<leader><cr>\15prev_match\6N\15next_match\6n\nclose\6q\1\0\2\14min_width\0032\15min_height\3\5\nsetup\bssr\frequire\0" },
|
config = { "\27LJ\2\nŸ\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\fkeymaps\1\0\4\15next_match\6n\16replace_all\17<leader><cr>\15prev_match\6N\nclose\6q\1\0\2\15min_height\3\5\14min_width\0032\nsetup\bssr\frequire\0" },
|
||||||
loaded = false,
|
loaded = false,
|
||||||
needs_bufread = false,
|
needs_bufread = false,
|
||||||
only_cond = false,
|
only_cond = false,
|
||||||
|
@ -221,6 +221,16 @@ _G.packer_plugins = {
|
||||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
path = "/home/leo/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
|
["typst-lsp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/leo/.local/share/nvim/site/pack/packer/start/typst-lsp",
|
||||||
|
url = "https://github.com/nvarner/typst-lsp"
|
||||||
|
},
|
||||||
|
["typst.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/leo/.local/share/nvim/site/pack/packer/start/typst.vim",
|
||||||
|
url = "https://github.com/kaarmu/typst.vim"
|
||||||
|
},
|
||||||
undotree = {
|
undotree = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/undotree",
|
path = "/home/leo/.local/share/nvim/site/pack/packer/start/undotree",
|
||||||
|
@ -292,14 +302,14 @@ if not vim.g.packer_custom_loader_enabled then
|
||||||
vim.g.packer_custom_loader_enabled = true
|
vim.g.packer_custom_loader_enabled = true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Config for: project.nvim
|
|
||||||
time([[Config for project.nvim]], true)
|
|
||||||
try_loadstring("\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0", "config", "project.nvim")
|
|
||||||
time([[Config for project.nvim]], false)
|
|
||||||
-- Config for: nvim-mapper
|
-- Config for: nvim-mapper
|
||||||
time([[Config for nvim-mapper]], true)
|
time([[Config for nvim-mapper]], true)
|
||||||
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper")
|
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper")
|
||||||
time([[Config for nvim-mapper]], false)
|
time([[Config for nvim-mapper]], false)
|
||||||
|
-- Config for: project.nvim
|
||||||
|
time([[Config for project.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0", "config", "project.nvim")
|
||||||
|
time([[Config for project.nvim]], false)
|
||||||
-- Config for: telescope.nvim
|
-- Config for: telescope.nvim
|
||||||
time([[Config for telescope.nvim]], true)
|
time([[Config for telescope.nvim]], true)
|
||||||
try_loadstring("\27LJ\2\nh\0\0\3\0\5\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\4\0B\0\2\1K\0\1\0\tcder\vmapper\19load_extension\14telescope\frequire\0", "config", "telescope.nvim")
|
try_loadstring("\27LJ\2\nh\0\0\3\0\5\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\4\0B\0\2\1K\0\1\0\tcder\vmapper\19load_extension\14telescope\frequire\0", "config", "telescope.nvim")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user