Skip to content

Commit

Permalink
Merge pull request #129 from brianhuster/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
brianhuster authored Oct 18, 2024
2 parents 8c47342 + c5c8f03 commit f7262bd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/livepreview/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
--- ```

local M = {}

M.server = require("livepreview.server")
M.utils = require("livepreview.utils")
M.spec = require("livepreview.spec")
Expand Down
1 change: 1 addition & 0 deletions plugin/livepreview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ package.loaded["live-preview"] = require("livepreview")
vim.filetype.add({
pattern = {
[".*/live%-preview%.nvim/doc/.+%.txt"] = "help",
[".*/live%-preview%.nvim/.*template.lua"] = "luatemplate"
},
})
19 changes: 19 additions & 0 deletions syntax/luatemplate.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
" Vim syntax file
" Language: Lua with embedded HTML as [[string]]
" Maintainer: Pham Binh An
" Latest Revision: 2024-10-18

if exists("b:current_syntax")
finish
endif

runtime! syntax/lua.vim
unlet b:current_syntax

syntax include @HTML syntax/template.vim

syntax region luaHTML start="\[\[" end="\]\]" contains=@HTML containedin=luaString,luaComment

highlight default link luaHTML htmlString

let b:current_syntax = "luatemplate"
1 change: 0 additions & 1 deletion tests/test.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# like to contribute to this project, please feel free to open an issue
$E = mc^2$
```mermaid
%%{init: {'theme':'neutral'}}%%
graph TD
A-->B;
A-->C;
Expand Down

0 comments on commit f7262bd

Please sign in to comment.