mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Grammar update
This commit is contained in:
32
vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand
vendored
Normal file
32
vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/bin/bash
|
||||
|
||||
NAME="$(cat)"
|
||||
if [[ -z "$NAME" ]]; then
|
||||
NAME="\$1"
|
||||
fi
|
||||
|
||||
echo "\`$NAME\`\$0"
|
||||
</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^'</string>
|
||||
<key>name</key>
|
||||
<string>Infix Function Call From Word / Selection</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.haskell</string>
|
||||
<key>uuid</key>
|
||||
<string>FA4AA254-EB7D-4B43-AC67-066AA9E8E8D9</string>
|
||||
</dict>
|
||||
</plist>
|
||||
53
vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand
vendored
Normal file
53
vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/bin/bash
|
||||
|
||||
THASKELL=${TM_HASKELL:-ghci}
|
||||
|
||||
esc () {
|
||||
STR="$1" ruby18 <<"RUBY"
|
||||
str = ENV['STR']
|
||||
str = str.gsub(/'/, "'\\\\''")
|
||||
str = str.gsub(/[\\"]/, '\\\\\\0')
|
||||
print "'#{str}'"
|
||||
RUBY
|
||||
}
|
||||
|
||||
osascript <<- APPLESCRIPT
|
||||
tell app "Terminal"
|
||||
launch
|
||||
activate
|
||||
do script "clear; cd $(esc "${TM_DIRECTORY}"); ${THASKELL} $(esc "${TM_FILEPATH}")"
|
||||
set position of first window to {100, 100}
|
||||
end tell
|
||||
APPLESCRIPT
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>inputFormat</key>
|
||||
<string>text</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@R</string>
|
||||
<key>name</key>
|
||||
<string>Load in GHCi</string>
|
||||
<key>outputCaret</key>
|
||||
<string>afterOutput</string>
|
||||
<key>outputFormat</key>
|
||||
<string>text</string>
|
||||
<key>outputLocation</key>
|
||||
<string>toolTip</string>
|
||||
<key>scope</key>
|
||||
<string>source.haskell</string>
|
||||
<key>semanticClass</key>
|
||||
<string>process.external.run.haskell</string>
|
||||
<key>uuid</key>
|
||||
<string>2242C46C-153E-4EEB-B80B-A5398559D759</string>
|
||||
<key>version</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
25
vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand
vendored
Normal file
25
vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/bin/bash
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; http://haskell.org/hoogle/?q=$(cat)\">"</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^H</string>
|
||||
<key>name</key>
|
||||
<string>Lookup on Hoogle</string>
|
||||
<key>output</key>
|
||||
<string>showAsHTML</string>
|
||||
<key>scope</key>
|
||||
<string>source.haskell</string>
|
||||
<key>uuid</key>
|
||||
<string>50D814AE-D850-4C97-AF3E-1FDE4366C6A3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
34
vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand
vendored
Normal file
34
vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>#!/bin/bash
|
||||
|
||||
NAME=${TM_FILENAME%.hs}
|
||||
if [[ -z "$NAME" ]]; then
|
||||
NAME="Main"
|
||||
fi
|
||||
|
||||
cat <<SNIPPET
|
||||
module \${1:$NAME} \${2/.+/(
|
||||
/m}\${2:function}\${2/.+/
|
||||
) /m}where
|
||||
\$0
|
||||
SNIPPET</string>
|
||||
<key>input</key>
|
||||
<string>none</string>
|
||||
<key>name</key>
|
||||
<string>module …</string>
|
||||
<key>output</key>
|
||||
<string>insertAsSnippet</string>
|
||||
<key>scope</key>
|
||||
<string>source.haskell</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>mod</string>
|
||||
<key>uuid</key>
|
||||
<string>156D0588-A61A-4419-9C71-6E47320A4DA5</string>
|
||||
</dict>
|
||||
</plist>
|
||||
55
vendor/grammars/haskell.tmbundle/Commands/Run.plist
vendored
Normal file
55
vendor/grammars/haskell.tmbundle/Commands/Run.plist
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>saveModifiedFiles</string>
|
||||
<key>command</key>
|
||||
<string>#!/usr/bin/env ruby18 -wKU
|
||||
require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/save_current_document"
|
||||
require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/executor"
|
||||
require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"
|
||||
|
||||
TextMate.save_if_untitled('hs')
|
||||
|
||||
haskell = e_sh(ENV['TM_HASKELL'] || 'runhaskell')
|
||||
TextMate::Executor.run(haskell, ENV['TM_FILEPATH'])
|
||||
</string>
|
||||
<key>input</key>
|
||||
<string>document</string>
|
||||
<key>inputFormat</key>
|
||||
<string>text</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>@r</string>
|
||||
<key>name</key>
|
||||
<string>Run</string>
|
||||
<key>outputCaret</key>
|
||||
<string>afterOutput</string>
|
||||
<key>outputFormat</key>
|
||||
<string>html</string>
|
||||
<key>outputLocation</key>
|
||||
<string>newWindow</string>
|
||||
<key>requiredCommands</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>command</key>
|
||||
<string>runhaskell</string>
|
||||
<key>locations</key>
|
||||
<array>
|
||||
<string>/opt/local/bin/runhugs</string>
|
||||
<string>/usr/local/bin/runhaskell</string>
|
||||
</array>
|
||||
<key>variable</key>
|
||||
<string>TM_HASKELL</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scope</key>
|
||||
<string>source.haskell</string>
|
||||
<key>semanticClass</key>
|
||||
<string>process.run.script.haskell</string>
|
||||
<key>uuid</key>
|
||||
<string>3B083BE7-9812-4F06-A758-CCAD9514E797</string>
|
||||
<key>version</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
24
vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand
vendored
Normal file
24
vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>beforeRunningCommand</key>
|
||||
<string>nop</string>
|
||||
<key>command</key>
|
||||
<string>haskelltype "$(cat)"</string>
|
||||
<key>fallbackInput</key>
|
||||
<string>word</string>
|
||||
<key>input</key>
|
||||
<string>selection</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^h</string>
|
||||
<key>name</key>
|
||||
<string>Show Type</string>
|
||||
<key>output</key>
|
||||
<string>showAsTooltip</string>
|
||||
<key>scope</key>
|
||||
<string>source.haskell</string>
|
||||
<key>uuid</key>
|
||||
<string>6B723007-D4EE-476B-8282-76230C559D5A</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user