feat(nvim): drop-in runtime tree

This commit is contained in:
2026-05-17 05:50:38 +02:00
parent c61fa5c53b
commit 218d2869a6
3 changed files with 28 additions and 1 deletions
Generated
+9 -1
View File
@@ -51,6 +51,14 @@ endif
all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc
# Neovim expects parser/<lang>.<soext> on its runtimepath. Build with
# `make nvim-parser` after cloning so the drop-in runtime tree works.
nvim-parser: parser/tumblr.$(SOEXT)
parser/tumblr.$(SOEXT): $(PARSER) $(EXTRAS)
@mkdir -p parser
$(TS) build --output $@
lib$(LANGUAGE_NAME).a: $(OBJS) lib$(LANGUAGE_NAME).a: $(OBJS)
$(AR) $(ARFLAGS) $@ $^ $(AR) $(ARFLAGS) $@ $^
@@ -112,4 +120,4 @@ clean:
test: test:
$(TS) test $(TS) test
.PHONY: all install uninstall clean test .PHONY: all install uninstall clean test nvim-parser
+8
View File
@@ -0,0 +1,8 @@
vim.filetype.add({
extension = {
tumblr = "tumblr",
},
pattern = {
[".*%.tumblr%.html"] = "tumblr",
},
})
+11
View File
@@ -0,0 +1,11 @@
if vim.b.did_ftplugin then
return
end
vim.b.did_ftplugin = true
local ok = pcall(vim.treesitter.start, 0, "tumblr")
if not ok then
return
end
vim.bo.commentstring = "<!-- %s -->"