Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dotfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Hensel
dotfiles
Commits
e436a4e4
Commit
e436a4e4
authored
8 months ago
by
Jan Hensel
Browse files
Options
Downloads
Patches
Plain Diff
nvim: Replace typst-lsp with tinymist (including mason now)
parent
acf4fb55
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.config/nvim/lua/plugins.lua
+8
-0
8 additions, 0 deletions
.config/nvim/lua/plugins.lua
.config/nvim/lua/ztf/lsp.lua
+27
-16
27 additions, 16 deletions
.config/nvim/lua/ztf/lsp.lua
with
35 additions
and
16 deletions
.config/nvim/lua/plugins.lua
+
8
−
0
View file @
e436a4e4
...
...
@@ -39,6 +39,14 @@ local plugins = {
config
=
function
()
require
(
"ztf.configure.dapui"
)
end
,
dependencies
=
{
"mfussenegger/nvim-dap"
},
},
{
"williamboman/mason.nvim"
,
opts
=
{
ensure_installed
=
{
"tinymist"
,
},
},
},
-- rust
{
'simrat39/rust-tools.nvim'
,
...
...
This diff is collapsed.
Click to expand it.
.config/nvim/lua/ztf/lsp.lua
+
27
−
16
View file @
e436a4e4
...
...
@@ -14,22 +14,33 @@ local configs = require 'lspconfig.configs'
lspconfig
.
gopls
.
setup
{}
lspconfig
.
typst_lsp
.
setup
{
root_dir
=
function
(
path
)
local
strip_dir_pat
=
'/([^/]+)$'
local
strip_sep_pat
=
'/$'
if
not
path
or
#
path
==
0
then
return
end
local
result
=
path
:
gsub
(
strip_sep_pat
,
''
):
gsub
(
strip_dir_pat
,
''
)
if
#
result
==
0
then
if
vim
.
loop
.
os_uname
().
version
:
match
'Windows'
then
return
path
:
sub
(
1
,
2
):
upper
()
else
return
'/'
end
end
return
result
-- lspconfig.typst_lsp.setup {
-- root_dir = function(path)
-- local strip_dir_pat = '/([^/]+)$'
-- local strip_sep_pat = '/$'
-- if not path or #path == 0 then
-- return
-- end
-- local result = path:gsub(strip_sep_pat, ''):gsub(strip_dir_pat, '')
-- if #result == 0 then
-- if vim.loop.os_uname().version:match 'Windows' then
-- return path:sub(1, 2):upper()
-- else
-- return '/'
-- end
-- end
-- return result
-- end,
-- }
-- tinymist is an LS for typst
lspconfig
.
tinymist
.
setup
{
settings
=
{
exportPdf
=
"onType"
,
outputPath
=
"$dir/live/$name"
,
},
root_dir
=
function
(
fname
)
return
lspconfig
.
util
.
path
.
dirname
(
fname
)
end
,
}
lspconfig
.
vimls
.
setup
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment