mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Use full lexer name in config file
This commit is contained in:
@@ -154,7 +154,7 @@ module Linguist
|
|||||||
@aliases = [default_alias_name] + (attributes[:aliases] || [])
|
@aliases = [default_alias_name] + (attributes[:aliases] || [])
|
||||||
|
|
||||||
# Lookup Lexer object
|
# Lookup Lexer object
|
||||||
@lexer = Lexer.find_by_alias(attributes[:lexer] || default_alias_name) ||
|
@lexer = Lexer.find_by_name(attributes[:lexer] || name) ||
|
||||||
raise(ArgumentError, "#{@name} is missing lexer")
|
raise(ArgumentError, "#{@name} is missing lexer")
|
||||||
|
|
||||||
# Set legacy search term
|
# Set legacy search term
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ ASP:
|
|||||||
- .ashx
|
- .ashx
|
||||||
- .asp
|
- .asp
|
||||||
ActionScript:
|
ActionScript:
|
||||||
:lexer: as3
|
:lexer: ActionScript 3
|
||||||
:search_term: as3
|
:search_term: as3
|
||||||
:aliases:
|
:aliases:
|
||||||
- as3
|
- as3
|
||||||
@@ -36,7 +36,7 @@ AppleScript:
|
|||||||
:ext:
|
:ext:
|
||||||
- .scpt
|
- .scpt
|
||||||
Arc:
|
Arc:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .arc
|
- .arc
|
||||||
Assembly:
|
Assembly:
|
||||||
@@ -47,7 +47,6 @@ Assembly:
|
|||||||
:ext:
|
:ext:
|
||||||
- .asm
|
- .asm
|
||||||
Batchfile:
|
Batchfile:
|
||||||
:lexer: bat
|
|
||||||
:search_term: bat
|
:search_term: bat
|
||||||
:aliases:
|
:aliases:
|
||||||
- bat
|
- bat
|
||||||
@@ -72,14 +71,12 @@ C:
|
|||||||
- .c
|
- .c
|
||||||
- .h
|
- .h
|
||||||
C#:
|
C#:
|
||||||
:lexer: csharp
|
|
||||||
:search_term: csharp
|
:search_term: csharp
|
||||||
:aliases:
|
:aliases:
|
||||||
- csharp
|
- csharp
|
||||||
:ext:
|
:ext:
|
||||||
- .cs
|
- .cs
|
||||||
C++:
|
C++:
|
||||||
:lexer: cpp
|
|
||||||
:search_term: cpp
|
:search_term: cpp
|
||||||
:aliases:
|
:aliases:
|
||||||
- cpp
|
- cpp
|
||||||
@@ -109,7 +106,7 @@ CoffeeScript:
|
|||||||
- .coffee
|
- .coffee
|
||||||
- Cakefile
|
- Cakefile
|
||||||
ColdFusion:
|
ColdFusion:
|
||||||
:lexer: cfm
|
:lexer: ColdFusion HTML
|
||||||
:search_term: cfm
|
:search_term: cfm
|
||||||
:aliases:
|
:aliases:
|
||||||
- cfm
|
- cfm
|
||||||
@@ -124,6 +121,7 @@ Common Lisp:
|
|||||||
- .lisp
|
- .lisp
|
||||||
- .ny
|
- .ny
|
||||||
Cucumber:
|
Cucumber:
|
||||||
|
:lexer: Gherkin
|
||||||
:ext:
|
:ext:
|
||||||
- .feature
|
- .feature
|
||||||
Cython:
|
Cython:
|
||||||
@@ -136,7 +134,6 @@ D:
|
|||||||
- .d
|
- .d
|
||||||
- .di
|
- .di
|
||||||
Darcs Patch:
|
Darcs Patch:
|
||||||
:lexer: dpatch
|
|
||||||
:search_term: dpatch
|
:search_term: dpatch
|
||||||
:aliases:
|
:aliases:
|
||||||
- dpatch
|
- dpatch
|
||||||
@@ -157,11 +154,11 @@ Dylan:
|
|||||||
:ext:
|
:ext:
|
||||||
- .dylan
|
- .dylan
|
||||||
Eiffel:
|
Eiffel:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .e
|
- .e
|
||||||
Emacs Lisp:
|
Emacs Lisp:
|
||||||
:lexer: scheme
|
:lexer: Scheme
|
||||||
:search_term: scheme
|
:search_term: scheme
|
||||||
:aliases:
|
:aliases:
|
||||||
- elisp
|
- elisp
|
||||||
@@ -206,7 +203,6 @@ Gentoo Eclass:
|
|||||||
:ext:
|
:ext:
|
||||||
- .eclass
|
- .eclass
|
||||||
Gettext Catalog:
|
Gettext Catalog:
|
||||||
:lexer: pot
|
|
||||||
:search_term: pot
|
:search_term: pot
|
||||||
:aliases:
|
:aliases:
|
||||||
- pot
|
- pot
|
||||||
@@ -227,9 +223,11 @@ HTML:
|
|||||||
- .htm
|
- .htm
|
||||||
- .xslt
|
- .xslt
|
||||||
HTML+Django:
|
HTML+Django:
|
||||||
|
:lexer: HTML+Django/Jinja
|
||||||
:ext:
|
:ext:
|
||||||
- .mustache
|
- .mustache
|
||||||
HTML+ERB:
|
HTML+ERB:
|
||||||
|
:lexer: RHTML
|
||||||
:ext:
|
:ext:
|
||||||
- .erb
|
- .erb
|
||||||
- .html.erb
|
- .html.erb
|
||||||
@@ -237,7 +235,7 @@ HTML+PHP:
|
|||||||
:ext:
|
:ext:
|
||||||
- .phtml
|
- .phtml
|
||||||
HaXe:
|
HaXe:
|
||||||
:lexer: hx
|
:lexer: haXe
|
||||||
:ext:
|
:ext:
|
||||||
- .hx
|
- .hx
|
||||||
- .hxml
|
- .hxml
|
||||||
@@ -255,7 +253,7 @@ INI:
|
|||||||
- .cfg
|
- .cfg
|
||||||
- .properties
|
- .properties
|
||||||
IRC log:
|
IRC log:
|
||||||
:lexer: irc
|
:lexer: IRC logs
|
||||||
:search_term: irc
|
:search_term: irc
|
||||||
:aliases:
|
:aliases:
|
||||||
- irc
|
- irc
|
||||||
@@ -290,7 +288,6 @@ JSON:
|
|||||||
:ext:
|
:ext:
|
||||||
- .json
|
- .json
|
||||||
Literate Haskell:
|
Literate Haskell:
|
||||||
:lexer: lhs
|
|
||||||
:search_term: lhs
|
:search_term: lhs
|
||||||
:aliases:
|
:aliases:
|
||||||
- lhs
|
- lhs
|
||||||
@@ -311,7 +308,7 @@ Mako:
|
|||||||
:ext:
|
:ext:
|
||||||
- .mao
|
- .mao
|
||||||
Markdown:
|
Markdown:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .md
|
- .md
|
||||||
- .mkd
|
- .mkd
|
||||||
@@ -322,11 +319,11 @@ Matlab:
|
|||||||
:ext:
|
:ext:
|
||||||
- .matlab
|
- .matlab
|
||||||
Max/MSP:
|
Max/MSP:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .mxt
|
- .mxt
|
||||||
Mirah:
|
Mirah:
|
||||||
:lexer: ruby
|
:lexer: Ruby
|
||||||
:search_term: ruby
|
:search_term: ruby
|
||||||
:ext:
|
:ext:
|
||||||
- .duby
|
- .duby
|
||||||
@@ -383,7 +380,7 @@ PHP:
|
|||||||
- .php4
|
- .php4
|
||||||
- .php5
|
- .php5
|
||||||
Parrot Internal Representation:
|
Parrot Internal Representation:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:search_term: pir
|
:search_term: pir
|
||||||
:aliases:
|
:aliases:
|
||||||
- pir
|
- pir
|
||||||
@@ -402,7 +399,7 @@ Perl:
|
|||||||
- .perl
|
- .perl
|
||||||
- .psgi
|
- .psgi
|
||||||
Pure Data:
|
Pure Data:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .pd
|
- .pd
|
||||||
Python:
|
Python:
|
||||||
@@ -410,18 +407,18 @@ Python:
|
|||||||
- .py
|
- .py
|
||||||
- .pyw
|
- .pyw
|
||||||
Python traceback:
|
Python traceback:
|
||||||
:lexer: pytb
|
|
||||||
:search_term: pytb
|
:search_term: pytb
|
||||||
:aliases:
|
:aliases:
|
||||||
- pytb
|
- pytb
|
||||||
:ext:
|
:ext:
|
||||||
- .pytb
|
- .pytb
|
||||||
R:
|
R:
|
||||||
|
:lexer: S
|
||||||
:ext:
|
:ext:
|
||||||
- .r
|
- .r
|
||||||
- .R
|
- .R
|
||||||
Racket:
|
Racket:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .rkt
|
- .rkt
|
||||||
- .rktl
|
- .rktl
|
||||||
@@ -430,7 +427,6 @@ RHTML:
|
|||||||
:ext:
|
:ext:
|
||||||
- .rhtml
|
- .rhtml
|
||||||
Raw token data:
|
Raw token data:
|
||||||
:lexer: raw
|
|
||||||
:search_term: raw
|
:search_term: raw
|
||||||
:aliases:
|
:aliases:
|
||||||
- raw
|
- raw
|
||||||
@@ -476,11 +472,11 @@ Scheme:
|
|||||||
- .sps
|
- .sps
|
||||||
- .scm
|
- .scm
|
||||||
Self:
|
Self:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .self
|
- .self
|
||||||
Shell:
|
Shell:
|
||||||
:lexer: bash
|
:lexer: Bash
|
||||||
:search_term: bash
|
:search_term: bash
|
||||||
:aliases:
|
:aliases:
|
||||||
- sh
|
- sh
|
||||||
@@ -497,7 +493,7 @@ Smarty:
|
|||||||
:ext:
|
:ext:
|
||||||
- .tpl
|
- .tpl
|
||||||
SuperCollider:
|
SuperCollider:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .sc
|
- .sc
|
||||||
Tcl:
|
Tcl:
|
||||||
@@ -515,26 +511,26 @@ TeX:
|
|||||||
- .cls
|
- .cls
|
||||||
- .aux
|
- .aux
|
||||||
Text:
|
Text:
|
||||||
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .txt
|
- .txt
|
||||||
Textile:
|
Textile:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .textile
|
- .textile
|
||||||
Vala:
|
Vala:
|
||||||
:ext:
|
:ext:
|
||||||
- .vala
|
- .vala
|
||||||
VHDL:
|
VHDL:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .vhdl
|
- .vhdl
|
||||||
- .vhd
|
- .vhd
|
||||||
Verilog:
|
Verilog:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .v
|
- .v
|
||||||
VimL:
|
VimL:
|
||||||
:lexer: vim
|
|
||||||
:search_term: vim
|
:search_term: vim
|
||||||
:aliases:
|
:aliases:
|
||||||
- vim
|
- vim
|
||||||
@@ -542,7 +538,7 @@ VimL:
|
|||||||
- .vim
|
- .vim
|
||||||
- .vimrc
|
- .vimrc
|
||||||
Visual Basic:
|
Visual Basic:
|
||||||
:lexer: text
|
:lexer: Text only
|
||||||
:ext:
|
:ext:
|
||||||
- .bas
|
- .bas
|
||||||
- .vbs
|
- .vbs
|
||||||
@@ -575,7 +571,7 @@ YAML:
|
|||||||
- .yml
|
- .yml
|
||||||
- .yaml
|
- .yaml
|
||||||
Java Server Pages:
|
Java Server Pages:
|
||||||
:lexer: jsp
|
:lexer: Java Server Page
|
||||||
:search_term: jsp
|
:search_term: jsp
|
||||||
:aliases:
|
:aliases:
|
||||||
- jsp
|
- jsp
|
||||||
@@ -588,7 +584,6 @@ ooc:
|
|||||||
:ext:
|
:ext:
|
||||||
- .ooc
|
- .ooc
|
||||||
reStructuredText:
|
reStructuredText:
|
||||||
:lexer: rst
|
|
||||||
:search_term: rst
|
:search_term: rst
|
||||||
:aliases:
|
:aliases:
|
||||||
- rst
|
- rst
|
||||||
|
|||||||
Reference in New Issue
Block a user