Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose plaintext syntax #1652

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Expose plaintext syntax
  • Loading branch information
Guldoman committed Oct 24, 2023
commit ada04665e0a68dd88a1f8cf1ab04d4144918b234
4 changes: 2 additions & 2 deletions data/core/syntax.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local common = require "core.common"
local syntax = {}
syntax.items = {}

local plain_text_syntax = { name = "Plain Text", patterns = {}, symbols = {} }
syntax.plain_text_syntax = { name = "Plain Text", patterns = {}, symbols = {} }


function syntax.add(t)
Expand Down Expand Up @@ -46,7 +46,7 @@ end
function syntax.get(filename, header)
return (filename and find(filename, "files"))
or (header and find(header, "headers"))
or plain_text_syntax
or syntax.plain_text_syntax
end


Expand Down