Compare commits

...

3 commits

Author SHA1 Message Date
DamitusThyYeetus123
0974c192d7
Merge 73cc5edd31 into b6785f8218 2024-11-18 17:59:18 +01:00
Soliprem
b6785f8218 typst: added single file support for tinymist 2024-11-18 12:09:34 +03:00
DamitusThyYeetus123
73cc5edd31 nvim-tree: Add directory opening 2024-11-12 13:25:08 +11:00
2 changed files with 10 additions and 2 deletions

View file

@ -58,6 +58,9 @@ in {
-- buffer is a real file on the disk
local real_file = vim.fn.filereadable(data.file) == 1
-- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1
-- buffer is a [No Name]
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
@ -65,15 +68,19 @@ in {
local filetype = vim.bo[data.buf].ft
-- only files please
if not real_file and not no_name then
if not real_file and not directory and not no_name then
return
end
-- skip ignored filetypes
if vim.tbl_contains(IGNORED_FT, filetype) then
return
end
end
-- cd if buffer is a directory
if directory then
vim.cmd.cd(data.file)
end
-- open the tree but don't focus it
require("nvim-tree.api").tree.toggle({ focus = false })
end

View file

@ -35,6 +35,7 @@
lspConfig = ''
lspconfig.tinymist.setup {
capabilities = capabilities,
single_file_support = true,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package