This repository was archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 206
[RFC] Ide generation and Guidance Proposition #107
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
04be888
Merge remote-tracking branch 'haskell/master'
rvion 33b4a06
Merge remote-tracking branch 'haskell/master'
rvion b5cc02e
Merge remote-tracking branch 'haskell/master'
rvion c650e88
rename elisp/.. to ide-emacs
rvion 1273e2c
add ode-atom and ide-sublime placeholder folders
rvion b876704
move plugin array outside of Main module
rvion bcf2d0a
add initial SublimeText python plugin generator
rvion 99a3882
rewrite readme to call for help in a more structures way
rvion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module Ide.SublimeText where | ||
|
||
import PluginList (plugins) | ||
import qualified Data.Map as M | ||
|
||
-- | Generate sublime text plugin in $REPOSITORY_ROOT/plugin-sublime folder | ||
generate :: IO () | ||
generate = do | ||
let func = M.assocs plugins | ||
-- TODO | ||
writeFile "plugin-sublime/haskell-ide.py" $ unlines | ||
putStrLn "done" | ||
return () | ||
|
||
tempCode = unlines | ||
[ "import sublime, sublimeplugin " | ||
, " " | ||
, "# Extends TextCommand so that run() receives a View to modify. " | ||
, "class DuplicateCommand(sublimeplugin.TextCommand): " | ||
, " def run(self, view, args): " | ||
, " # Walk through each region in the selection " | ||
, " for region in view.sel(): " | ||
, " # Only interested in empty regions, otherwise they may span multiple " | ||
, " # lines, which doesn't make sense for this command. " | ||
, " if region.empty(): " | ||
, " # Expand the region to the full line it resides on, excluding the newline " | ||
, " line = view.line(region) " | ||
, " # Extract the string for the line, and add a newline " | ||
, " lineContents = view.substr(line) + '\n' " | ||
, " # Add the text at the beginning of the line " | ||
, " view.insert(line.begin(), lineContents) " | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module PluginList | ||
( plugins | ||
) where | ||
|
||
import Haskell.Ide.Engine.BasePlugin | ||
import Haskell.Ide.ExamplePlugin2 | ||
import Haskell.Ide.GhcModPlugin | ||
import Haskell.Ide.HaRePlugin | ||
|
||
-- --------------------------------------------------------------------- | ||
|
||
-- | This will be read from a configuration, eventually | ||
plugins :: Plugins | ||
plugins = Map.fromList | ||
[ | ||
-- Note: statically including known plugins. In future this map could be set | ||
-- up via a config file of some kind. | ||
("eg2", example2Descriptor) | ||
, ("ghcmod", ghcmodDescriptor) | ||
, ("hare", hareDescriptor) | ||
-- The base plugin, able to answer questions about the IDE Engine environment. | ||
, ("base", baseDescriptor) | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitkeep |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitkeep |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's spelled
ghc-mod
;)