Permalink
Browse files

initalizing repo

  • Loading branch information...
0 parents commit d3fdb2ae51b14ec1033a3d1d718cb6ab2da154d9 @njlg njlg committed Mar 13, 2012
Showing with 1,442 additions and 0 deletions.
  1. +66 −0 Base File.sublime-settings
  2. +10 −0 Default.sublime-commands
  3. +137 −0 Default.sublime-keymap
  4. +39 −0 Main.sublime-menu
  5. +264 −0 NaturalDocs.py
  6. +319 −0 README.md
  7. +167 −0 base_parser.py
  8. 0 parsers/__init__.py
  9. +78 −0 parsers/javascript.py
  10. +134 −0 parsers/perl.py
  11. +105 −0 parsers/php.py
  12. +123 −0 parsers/python.py
@@ -0,0 +1,66 @@
+{
+ // If true, when in a docblock, pressing tab after a @tag line
+ // (like @param, @return) will indent to the description. This is useful if
+ // you are writing a long description and want that block of text to
+ // stay aligned.
+ "natural_docs_deep_indent": true,
+
+ // If true, then pressing enter while in a double-slash comment
+ // (like this one) will automatically add two slashes to the next line
+ // as well
+ "natural_docs_extend_double_slash": true,
+
+ // the number of spaces to add after the leading *
+ "natural_docs_indentation_spaces": 1,
+
+ // Any additional boilerplate tags which should be added to each block.
+ // Should be an array of strings. Note that this only applies when a docblock
+ // is opened directly preceding a function. Tab points can be added by using
+ // snippet syntax, eg: ${1:default text}
+ "natural_docs_extra_tags": [],
+
+ // A map to determine the value of variables, should hungarian notation
+ // (or similar) be in use
+ "natural_docs_notation_map": [],
+
+ // Whether there should be blank lines added between the description line, and
+ // between tags of different types. If true, the output might look like this:
+ //
+ // /**
+ // * Function: <functionName>
+ // *
+ // * [description]
+ // *
+ // * Parameters:
+ // *
+ // * foo - [description]
+ // * bar - [description]
+ // *
+ // * Returns:
+ // *
+ // * [description]
+ // */
+ "natural_docs_spacer_between_sections": true,
+
+
+ // Whether Perl blocks should use POD style or # style. Example of POD Style:
+ //
+ // =begin ND
+ //
+ // Function: <functionName>
+ //
+ // [description]
+ //
+ // Parameters:
+ //
+ // foo - [description]
+ // bar - [description]
+ //
+ // Returns:
+ //
+ // [description]
+ //
+ // =cut
+ //
+ "natural_docs_perl_use_pod": true
+}
@@ -0,0 +1,10 @@
+[
+ {
+ "caption": "NaturalDocs: Add Comment",
+ "command": "natural_docs"
+ },
+ {
+ "caption": "NaturalDocs: Decorate line comment",
+ "command": "natural_docs_decorate"
+ }
+]
@@ -0,0 +1,137 @@
+[
+ { "keys": ["super+n"], "command": "natural_docs_insert_block" },
+ { "keys": ["super+d"], "command": "natural_docs_decorate" },
+ { "keys": ["enter"], "command": "natural_docs", "context" :
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true }
+ ]
+ },
+ { "keys": ["enter"], "command": "natural_docs", "context" :
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*=begin ND$", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "source.perl", "match_all": true}
+ ]
+ },
+ { "keys": ["enter"], "command": "natural_docs", "context" :
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\"\"\"$", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "source.python", "match_all": true}
+ ]
+ },
+ { "keys": ["tab"], "command": "natural_docs", "context" :
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true }
+ ]
+ },
+ { "keys": ["shift+enter"], "command": "natural_docs", "args": {"inline": true}, "context" :
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true }
+ ]
+ },
+ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "comment.block.documentation", "match_all": true},
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
+ ]
+ },
+ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\/\\/\\s*).*$/$1/}"}, "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "setting.natural_docs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true},
+ { "key": "selector", "operator": "equal", "operand": "comment.line.double-slash", "match_all": true},
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true}
+ ]
+ },
+ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(#\\s*).*$/$1/}"}, "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": " comment.line.number-sign", "match_all": true},
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*#", "match_all": true}
+ ]
+ },
+ { "keys": ["keypad_enter"], "command": "natural_docs", "context" :
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true }
+ ]
+ },
+ { "keys": ["shift+keypad_enter"], "command": "natural_docs", "args": {"inline": true}, "context" :
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*{2}$", "match_all": true }
+ ]
+ },
+ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true },
+ { "key": "selector", "operator": "equal", "operand": "comment.block.documentation", "match_all": true},
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
+ ]
+ },
+ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\/\\/\\s*).*$/$1/}"}, "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "setting.natural_docs_extend_double_slash", "operator": "equal", "operand": true, "match_all": true},
+ { "key": "selector", "operator": "equal", "operand": "comment.line.double-slash", "match_all": true},
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\/", "match_all": true}
+ ]
+ },
+ { "keys": ["tab"], "command": "natural_docs_indent", "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*\\s*$", "match_all": true },
+ { "key": "has_next_field", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "comment.block.documentation", "match_all": true }
+ ]
+ },
+ { "keys": ["ctrl+enter"], "command": "natural_docs_decorate", "context":
+ [
+ { "key": "selector", "operator": "equal", "operand": "comment.line.double-slash"}
+ ]
+ },
+ { "keys": ["ctrl+j"], "command": "natural_docs_join", "context":
+ [
+ { "key": "selector", "operator": "equal", "operand": "comment.block.documentation" }
+ ]
+ },
+
+ // non-standard documentation
+ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n * ${1}\n *\/"}, "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\/\\*[^\\*\/]*$", "match_all": true }
+ ]
+ },
+ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n${TM_CURRENT_LINE/^\\s*(\\*\\s*).*$/$1/}"}, "context":
+ [
+ { "key": "setting.auto_indent", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "comment.block", "match_all": true},
+ { "key": "auto_complete_visible", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\*", "match_all": true }
+ ]
+ }
+]
@@ -0,0 +1,39 @@
+[
+ {
+ "caption": "Preferences",
+ "mnemonic": "n",
+ "id": "preferences",
+ "children":
+ [
+ {
+ "caption": "Package Settings",
+ "mnemonic": "P",
+ "id": "package-settings",
+ "children":
+ [
+ {
+ "caption": "NaturalDocs",
+ "children":
+ [
+ {
+ "command": "open_file", "args":
+ {
+ "file": "${packages}/NaturalDocs/Base File.sublime-settings"
+ },
+ "caption": "Settings – Default"
+ },
+ {
+ "command": "open_file", "args":
+ {
+ "file": "${packages}/User/Base File.sublime-settings"
+ },
+ "caption": "Settings – User"
+ },
+ { "caption": "-" }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]
Oops, something went wrong. Retry.

0 comments on commit d3fdb2a

Please sign in to comment.