Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
5 changes: 5 additions & 0 deletions rc/filetype/apl.kak
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
provide-module detect-apl %@
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should change module names. With this PR, we have.

provide-module detect-apl %{
	hook global WinSetOption filetype=apl %{
	    require-module apl
	}
	...
}
provide-module apl %{
	add-highlighter shared/apl regions
	...
}

It's possible that we want to include the "filetype" path component,
to prevent future clashes.
We could do this in a backwards-compatible way
by also providing an empty module with the old name.

provide-module filetype-apl-detection %{
	hook global WinSetOption filetype=apl %{
	    require-module filetype-apl
	}
	...
}
provide-module filetype-apl %{
	provide-module apl %{} # historical
	add-highlighter shared/apl regions
	...
}

Not yet sure if this is worth it, but it seems like now is a good time to think about this.
There's no existing discussion in #2782.

I wonder what are the odds that our modules (like jump, make, tmux, screen) will ever collide with filetype modules of the same name..

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be happy to use different names for the detection modules if you'd like. I would probably need to check but I'm not entirely sure if your suggested filetype module name change, though, wouldn't be breaking? The apl module would be kept hidden until filetype-apl is required?

Perhaps we could open an issue on the topic, I would personally consider it a separate change.


# Detection
# ‾‾‾‾‾‾‾‾‾
Expand Down Expand Up @@ -26,6 +27,10 @@ hook -group apl-highlight global WinSetOption filetype=apl %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/apl }
}

@

require-module detect-apl

provide-module apl %¹

# Highlighters & Completion
Expand Down
7 changes: 7 additions & 0 deletions rc/filetype/arch-linux.kak
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# package build description file

provide-module detect-arch-linux %{

hook global BufCreate (.*/)?PKGBUILD %{
set-option buffer filetype sh
}

}

require-module detect-arch-linux
6 changes: 6 additions & 0 deletions rc/filetype/asciidoc.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://asciidoc.org/
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

provide-module detect-asciidoc %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand All @@ -18,6 +20,10 @@ hook -group asciidoc-highlight global WinSetOption filetype=asciidoc %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/asciidoc }
}

}

require-module detect-asciidoc

provide-module asciidoc %{

# Highlighters
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/awk.kak
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
provide-module detect-awk %{

# Detection
# ---------

Expand All @@ -22,6 +24,10 @@ hook -group awk-highlight global WinSetOption filetype=awk %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/awk }
}

}

require-module detect-awk

provide-module awk %@

# Highlighters
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/c-family.kak
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
provide-module detect-c-family %[

# Detection
hook global BufCreate .*\.(cc|cpp|cxx|C|hh|hpp|hxx|H)$ %{
set-option buffer filetype cpp
Expand Down Expand Up @@ -59,6 +61,10 @@ hook -group objc-highlight global WinSetOption filetype=objc %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/objc }
}

]

require-module detect-c-family


provide-module c-family %§

Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/cabal.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://haskell.org/cabal
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

provide-module detect-cabal %[

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand Down Expand Up @@ -28,6 +30,10 @@ hook -group cabal-highlight global WinSetOption filetype=cabal %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cabal }
}

]

require-module detect-cabal


provide-module cabal %[

Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/clojure.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://clojure.org
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

provide-module detect-clojure %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand All @@ -25,6 +27,10 @@ hook -group clojure-insert global BufNewFile .*[.](clj|cljc|cljs|cljx) %{
clojure-insert-ns
}

}

require-module detect-clojure

provide-module clojure %{

require-module lisp
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/cmake.kak
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
provide-module detect-cmake %{

hook global BufCreate .+\.cmake|.*/CMakeLists.txt %{
set-option buffer filetype cmake
}
Expand All @@ -15,6 +17,10 @@ hook -group cmake-highlight global WinSetOption filetype=cmake %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cmake }
}

}

require-module detect-cmake

provide-module cmake %{

add-highlighter shared/cmake regions
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/coffee.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://coffeescript.org
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

provide-module detect-coffee %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand All @@ -26,6 +28,10 @@ hook -group coffee-highlight global WinSetOption filetype=coffee %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/coffee }
}

}

require-module detect-coffee


provide-module coffee %[

Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/conf.kak
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
provide-module detect-conf %{

hook global BufCreate .+\.(repo|cfg|properties|desktop) %{
set-option buffer filetype conf
}
Expand All @@ -18,6 +20,10 @@ hook -group conf-highlight global WinSetOption filetype=conf %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/conf }
}

}

require-module detect-conf

provide-module conf %{

add-highlighter shared/conf regions
Expand Down
5 changes: 5 additions & 0 deletions rc/filetype/coq.kak
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
provide-module detect-coq %{

# Detection
# --------
Expand All @@ -23,6 +24,10 @@ hook global WinSetOption filetype=coq %{
}
}

}

require-module detect-coq

provide-module coq %{

# Syntax
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/crystal.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Crystal
# https://crystal-lang.org

provide-module detect-crystal %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand Down Expand Up @@ -28,6 +30,10 @@ hook global WinSetOption filetype=crystal %{
}
}

}

require-module detect-crystal

provide-module crystal %§

declare-option -hidden str-list crystal_keywords 'abstract' 'alias' 'annotation' 'as' 'asm' 'begin' 'break' 'case' 'class' 'def' 'do' 'else' 'elsif' 'end' 'ensure' 'enum' 'extend' 'false' 'for' 'fun' 'if' 'include' 'instance_sizeof' 'is_a?' 'lib' 'macro' 'module' 'next' 'nil' 'nil?' 'of' 'offsetof' 'out' 'pointerof' 'private' 'protected' 'require' 'rescue' 'responds_to?' 'return' 'select' 'self' 'sizeof' 'struct' 'super' 'then' 'true' 'type' 'typeof' 'uninitialized' 'union' 'unless' 'until' 'verbatim' 'when' 'while' 'with' 'yield'
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/css.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://w3.org/Style/CSS
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

provide-module detect-css %[

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand Down Expand Up @@ -29,6 +31,10 @@ hook -group css-highlight global WinSetOption filetype=css %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/css }
}

]

require-module detect-css


provide-module css %[

Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/cucumber.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://cukes.info
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

provide-module detect-cucumber %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand All @@ -26,6 +28,10 @@ hook -group cucumber-highlight global WinSetOption filetype=cucumber %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cucumber }
}

}

require-module detect-cucumber


provide-module cucumber %{

Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/cue.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# https://cuelang.org
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

provide-module detect-cue %[

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand Down Expand Up @@ -29,6 +31,10 @@ hook -group cue-highlight global WinSetOption filetype=cue %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/cue }
}

]

require-module detect-cue

provide-module cue %§

# Highlighters
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/d.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://dlang.org/
#

provide-module detect-d %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand Down Expand Up @@ -31,6 +33,10 @@ hook -group d-highlight global WinSetOption filetype=d %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/d }
}

}

require-module detect-d

provide-module d %§

# Highlighters
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/dart.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# https://dartlang.org/
#

provide-module detect-dart %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand Down Expand Up @@ -31,6 +33,10 @@ hook -group dart-highlight global WinSetOption filetype=dart %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/dart }
}

}

require-module detect-dart


provide-module dart %§

Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/dhall.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# https://dhall-lang.org
#

provide-module detect-dhall %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand All @@ -26,6 +28,10 @@ hook -group dhall-highlight global WinSetOption filetype=dhall %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/dhall }
}

}

require-module detect-dhall


provide-module dhall %[

Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/diff.kak
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
provide-module detect-diff %{

hook global BufCreate .*\.(diff|patch) %{
set-option buffer filetype diff
}
Expand All @@ -12,6 +14,10 @@ hook -group diff-highlight global WinSetOption filetype=diff %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/diff }
}

}

require-module detect-diff

provide-module diff %§

add-highlighter shared/diff group
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/dockerfile.kak
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

# See https://docs.docker.com/reference/builder

provide-module detect-dockerfile %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand All @@ -23,6 +25,10 @@ hook -group dockerfile-highlight global WinSetOption filetype=dockerfile %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/dockerfile }
}

}

require-module detect-dockerfile

provide-module dockerfile %{

# Highlighters
Expand Down
6 changes: 6 additions & 0 deletions rc/filetype/elixir.kak
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://elixir-lang.org
# ----------------------

provide-module detect-elixir %{

# Detection
# ‾‾‾‾‾‾‾‾‾

Expand Down Expand Up @@ -41,6 +43,10 @@ hook -group eex-highlight global WinSetOption filetype=eex %{
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/eex }
}

}

require-module detect-elixir

provide-module eex %{
require-module html
require-module elixir
Expand Down
Loading