Make shebangs optional, they don't make sense outside of scripts

pull/1050/head
Blaž Hrastnik 3 years ago
parent 41fc326325
commit f804ed3192

@ -52,7 +52,8 @@ pub struct LanguageConfiguration {
pub language_id: String, pub language_id: String,
pub scope: String, // source.rust pub scope: String, // source.rust
pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc> pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc>
pub shebangs: Vec<String>, // interpreter(s) associated with language #[serde(default)]
pub shebangs: Vec<String>, // interpreter(s) associated with language
pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml> pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml>
pub comment_token: Option<String>, pub comment_token: Option<String>,

@ -3,7 +3,6 @@ name = "rust"
scope = "source.rust" scope = "source.rust"
injection-regex = "rust" injection-regex = "rust"
file-types = ["rs"] file-types = ["rs"]
shebangs = []
roots = [] roots = []
auto-format = true auto-format = true
comment-token = "//" comment-token = "//"
@ -18,7 +17,6 @@ name = "toml"
scope = "source.toml" scope = "source.toml"
injection-regex = "toml" injection-regex = "toml"
file-types = ["toml"] file-types = ["toml"]
shebangs = []
roots = [] roots = []
comment-token = "#" comment-token = "#"
@ -29,7 +27,6 @@ name = "protobuf"
scope = "source.proto" scope = "source.proto"
injection-regex = "protobuf" injection-regex = "protobuf"
file-types = ["proto"] file-types = ["proto"]
shebangs = []
roots = [] roots = []
comment-token = "//" comment-token = "//"
@ -40,7 +37,7 @@ name = "elixir"
scope = "source.elixir" scope = "source.elixir"
injection-regex = "elixir" injection-regex = "elixir"
file-types = ["ex", "exs"] file-types = ["ex", "exs"]
shebangs = [] shebangs = ["elixir"]
roots = [] roots = []
comment-token = "#" comment-token = "#"
@ -64,7 +61,6 @@ name = "json"
scope = "source.json" scope = "source.json"
injection-regex = "json" injection-regex = "json"
file-types = ["json"] file-types = ["json"]
shebangs = []
roots = [] roots = []
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -74,7 +70,6 @@ name = "c"
scope = "source.c" scope = "source.c"
injection-regex = "c" injection-regex = "c"
file-types = ["c"] # TODO: ["h"] file-types = ["c"] # TODO: ["h"]
shebangs = []
roots = [] roots = []
comment-token = "//" comment-token = "//"
@ -86,7 +81,6 @@ name = "cpp"
scope = "source.cpp" scope = "source.cpp"
injection-regex = "cpp" injection-regex = "cpp"
file-types = ["cc", "hh", "cpp", "hpp", "h", "ipp", "tpp", "cxx", "hxx", "ixx", "txx", "ino"] file-types = ["cc", "hh", "cpp", "hpp", "h", "ipp", "tpp", "cxx", "hxx", "ixx", "txx", "ino"]
shebangs = []
roots = [] roots = []
comment-token = "//" comment-token = "//"
@ -98,7 +92,6 @@ name = "c-sharp"
scope = "source.csharp" scope = "source.csharp"
injection-regex = "c-?sharp" injection-regex = "c-?sharp"
file-types = ["cs"] file-types = ["cs"]
shebangs = []
roots = [] roots = []
comment-token = "//" comment-token = "//"
@ -109,7 +102,6 @@ name = "go"
scope = "source.go" scope = "source.go"
injection-regex = "go" injection-regex = "go"
file-types = ["go"] file-types = ["go"]
shebangs = []
roots = ["Gopkg.toml", "go.mod"] roots = ["Gopkg.toml", "go.mod"]
auto-format = true auto-format = true
comment-token = "//" comment-token = "//"
@ -123,7 +115,7 @@ name = "javascript"
scope = "source.js" scope = "source.js"
injection-regex = "^(js|javascript)$" injection-regex = "^(js|javascript)$"
file-types = ["js", "mjs"] file-types = ["js", "mjs"]
shebangs = [] shebangs = ["node"]
roots = [] roots = []
comment-token = "//" comment-token = "//"
# TODO: highlights-jsx, highlights-params # TODO: highlights-jsx, highlights-params
@ -147,7 +139,6 @@ name = "tsx"
scope = "source.tsx" scope = "source.tsx"
injection-regex = "^(tsx)$" # |typescript injection-regex = "^(tsx)$" # |typescript
file-types = ["tsx"] file-types = ["tsx"]
shebangs = []
roots = [] roots = []
# TODO: highlights-jsx, highlights-params # TODO: highlights-jsx, highlights-params
@ -159,7 +150,6 @@ name = "css"
scope = "source.css" scope = "source.css"
injection-regex = "css" injection-regex = "css"
file-types = ["css"] file-types = ["css"]
shebangs = []
roots = [] roots = []
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -169,7 +159,6 @@ name = "html"
scope = "text.html.basic" scope = "text.html.basic"
injection-regex = "html" injection-regex = "html"
file-types = ["html"] file-types = ["html"]
shebangs = []
roots = [] roots = []
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -238,7 +227,6 @@ name = "latex"
scope = "source.tex" scope = "source.tex"
injection-regex = "tex" injection-regex = "tex"
file-types = ["tex"] file-types = ["tex"]
shebangs = []
roots = [] roots = []
comment-token = "%" comment-token = "%"
@ -249,7 +237,6 @@ name = "julia"
scope = "source.julia" scope = "source.julia"
injection-regex = "julia" injection-regex = "julia"
file-types = ["jl"] file-types = ["jl"]
shebangs = []
roots = [] roots = []
comment-token = "#" comment-token = "#"
language-server = { command = "julia", args = [ language-server = { command = "julia", args = [
@ -275,7 +262,6 @@ name = "java"
scope = "source.java" scope = "source.java"
injection-regex = "java" injection-regex = "java"
file-types = ["java"] file-types = ["java"]
shebangs = []
roots = [] roots = []
indent = { tab-width = 4, unit = " " } indent = { tab-width = 4, unit = " " }
@ -284,7 +270,6 @@ name = "ledger"
scope = "source.ledger" scope = "source.ledger"
injection-regex = "ledger" injection-regex = "ledger"
file-types = ["ldg", "ledger", "journal"] file-types = ["ldg", "ledger", "journal"]
shebangs = []
roots = [] roots = []
comment-token = ";" comment-token = ";"
indent = { tab-width = 4, unit = " " } indent = { tab-width = 4, unit = " " }
@ -312,7 +297,7 @@ indent = { tab-width = 2, unit = " "}
name = "lua" name = "lua"
scope = "source.lua" scope = "source.lua"
file-types = ["lua"] file-types = ["lua"]
shebangs = [] shebangs = ["lua"]
roots = [] roots = []
comment-token = "--" comment-token = "--"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -322,7 +307,6 @@ name = "svelte"
scope = "source.svelte" scope = "source.svelte"
injection-regex = "svelte" injection-regex = "svelte"
file-types = ["svelte"] file-types = ["svelte"]
shebangs = []
roots = [] roots = []
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
language-server = { command = "svelteserver", args = ["--stdio"] } language-server = { command = "svelteserver", args = ["--stdio"] }
@ -333,7 +317,6 @@ name = "vue"
scope = "source.vue" scope = "source.vue"
injection-regex = "vue" injection-regex = "vue"
file-types = ["vue"] file-types = ["vue"]
shebangs = []
roots = [] roots = []
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -341,7 +324,6 @@ indent = { tab-width = 2, unit = " " }
name = "yaml" name = "yaml"
scope = "source.yaml" scope = "source.yaml"
file-types = ["yml", "yaml"] file-types = ["yml", "yaml"]
shebangs = []
roots = [] roots = []
comment-token = "#" comment-token = "#"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -361,7 +343,6 @@ name = "zig"
scope = "source.zig" scope = "source.zig"
injection-regex = "zig" injection-regex = "zig"
file-types = ["zig"] file-types = ["zig"]
shebangs = []
roots = ["build.zig"] roots = ["build.zig"]
auto-format = true auto-format = true
comment-token = "//" comment-token = "//"
@ -386,7 +367,6 @@ language-server = { command = "swipl", args = [
name = "tsq" name = "tsq"
scope = "source.tsq" scope = "source.tsq"
file-types = ["scm"] file-types = ["scm"]
shebangs = []
roots = [] roots = []
comment-token = ";" comment-token = ";"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -395,7 +375,6 @@ indent = { tab-width = 2, unit = " " }
name = "cmake" name = "cmake"
scope = "source.cmake" scope = "source.cmake"
file-types = ["cmake", "CMakeLists.txt"] file-types = ["cmake", "CMakeLists.txt"]
shebangs = []
roots = [] roots = []
comment-token = "#" comment-token = "#"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -405,7 +384,6 @@ language-server = { command = "cmake-language-server" }
name = "glsl" name = "glsl"
scope = "source.glsl" scope = "source.glsl"
file-types = ["glsl", "vert", "tesc", "tese", "geom", "frag", "comp" ] file-types = ["glsl", "vert", "tesc", "tese", "geom", "frag", "comp" ]
shebangs = []
roots = [] roots = []
comment-token = "//" comment-token = "//"
indent = { tab-width = 4, unit = " " } indent = { tab-width = 4, unit = " " }

Loading…
Cancel
Save