├── .ignore ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.yml │ └── bug_report.yml ├── dependabot.yml ├── FUNDING.yml ├── workflows │ ├── rumdl-lint.yml │ ├── stale-bot.yml │ ├── pr-title.yml │ ├── alfred-workflow-release.yml │ └── update-help-index.yml ├── pull_request_template.md └── help-index │ └── create-index.sh ├── icon.png ├── .gitignore ├── .gitattributes ├── mason-logo.png ├── vimdoc2html ├── .gitattributes ├── vimhelp.css ├── helpztags ├── vimdoc2html.py ├── vimd2h.py └── COPYING ├── C906BF1E-7CF4-4407-9B97-53532876DCC0.png ├── scripts ├── get-oldfiles.sh ├── nvim-recent-files.js ├── open-help.js ├── neovim-help-search.js ├── search-mason-tools.js ├── search-installed-plugins.js └── search-nvim-plugins.js ├── prefs.plist ├── .editorconfig ├── .rsync-exclude ├── LICENSE ├── Justfile ├── .rumdl.toml ├── .build-and-release.sh ├── README.md └── info.plist /.ignore: -------------------------------------------------------------------------------- 1 | vimdoc2html 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisgrieser/alfred-neovim-utilities/HEAD/icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac 2 | .DS_Store 3 | 4 | # Alfred 5 | prefs.plist 6 | *.alfredworkflow 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # mark as generated files for github stats & diffs 2 | info.plist linguist-generated 3 | -------------------------------------------------------------------------------- /mason-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisgrieser/alfred-neovim-utilities/HEAD/mason-logo.png -------------------------------------------------------------------------------- /vimdoc2html/.gitattributes: -------------------------------------------------------------------------------- 1 | # exclude these files from git diffs and stats 2 | * linguist-vendored 3 | -------------------------------------------------------------------------------- /C906BF1E-7CF4-4407-9B97-53532876DCC0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisgrieser/alfred-neovim-utilities/HEAD/C906BF1E-7CF4-4407-9B97-53532876DCC0.png -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | commit-message: 8 | prefix: "chore(dependabot): " 9 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/displaying-a-sponsor-button-in-your-repository 2 | 3 | custom: https://www.paypal.me/ChrisGrieser 4 | ko_fi: pseudometa 5 | -------------------------------------------------------------------------------- /scripts/get-oldfiles.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # WARN do not embed this file into the js file, otherwise it does retrieve the 4 | # proper oldfiles, since it then lacks information on the location of the shada 5 | # file for some reason 6 | temp=/tmp/oldfiles.txt 7 | [[ -e "$temp" ]] && rm "$temp" 8 | nvim -c "redir > $temp | echo v:oldfiles | redir end | q" &>/dev/null 9 | cat "$temp" 10 | -------------------------------------------------------------------------------- /prefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | help_search 6 | vim 7 | old_search 8 | old 9 | plugin_installation_path 10 | ~/.local/share/nvim/lazy 11 | plugin_search 12 | nv 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/workflows/rumdl-lint.yml: -------------------------------------------------------------------------------- 1 | name: Markdown linting via rumdl 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | paths: 7 | - "**/*.md" 8 | - ".github/workflows/rumdl-lint.yml" 9 | - ".rumdl.toml" 10 | pull_request: 11 | paths: 12 | - "**/*.md" 13 | 14 | jobs: 15 | rumdl: 16 | name: rumdl 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@v6 20 | - uses: rvben/rumdl@v0 21 | with: 22 | report-type: annotations 23 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | max_line_length = 100 5 | end_of_line = lf 6 | charset = utf-8 7 | insert_final_newline = true 8 | indent_style = tab 9 | indent_size = 3 10 | tab_width = 3 11 | trim_trailing_whitespace = true 12 | 13 | [*.{yml,yaml,scm,cff}] 14 | indent_style = space 15 | indent_size = 2 16 | tab_width = 2 17 | 18 | [*.py] 19 | indent_style = space 20 | indent_size = 4 21 | tab_width = 4 22 | 23 | [*.md] 24 | indent_style = space 25 | indent_size = 4 26 | trim_trailing_whitespace = false 27 | -------------------------------------------------------------------------------- /.rsync-exclude: -------------------------------------------------------------------------------- 1 | # vim: ft=gitignore 2 | #─────────────────────────────────────────────────────────────────────────────── 3 | 4 | # git 5 | .git/ 6 | .gitignore 7 | .gitattributes 8 | 9 | # Alfred 10 | prefs.plist 11 | .rsync-exclude 12 | 13 | # docs 14 | docs/ 15 | LICENSE 16 | # INFO leading `/` -> ignore only the README in the root, not in subfolders 17 | /README.md 18 | 19 | # build 20 | Justfile 21 | .github/ 22 | .build-and-release.sh 23 | 24 | # linter & types 25 | .harper-dictionary.txt 26 | .typos.toml 27 | .editorconfig 28 | .rumdl.toml 29 | .rumdl_cache 30 | jxa-globals.d.ts 31 | jsconfig.json 32 | alfred.d.ts 33 | 34 | # other 35 | *.shortcut 36 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Problem statement 2 | 3 | 4 | ## Proposed solution 5 | 6 | 7 | ## AI usage disclosure 8 | 11 | 12 | ## Checklist 13 | - [ ] Variable names follow `camelCase` convention. 14 | - [ ] All AI-generated code has been reviewed by a human. 15 | - [ ] Documentation (`README.md` and internal workflow docs) has been updated 16 | for any new or modified functionality. 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea 3 | title: "Feature Request: " 4 | labels: ["enhancement"] 5 | body: 6 | - type: textarea 7 | id: feature-requested 8 | attributes: 9 | label: Feature Requested 10 | description: A clear and concise description of the feature. 11 | validations: 12 | required: true 13 | - type: textarea 14 | id: screenshot 15 | attributes: 16 | label: Relevant Screenshot 17 | description: If applicable, add screenshots or a screen recording to help explain the request. 18 | - type: checkboxes 19 | id: checklist 20 | attributes: 21 | label: Checklist 22 | options: 23 | - label: The feature would be useful to more users than just me. 24 | required: true 25 | -------------------------------------------------------------------------------- /.github/workflows/stale-bot.yml: -------------------------------------------------------------------------------- 1 | name: Stale bot 2 | on: 3 | schedule: 4 | - cron: "18 04 * * 3" 5 | 6 | permissions: 7 | issues: write 8 | pull-requests: write 9 | 10 | jobs: 11 | stale: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Close stale issues 15 | uses: actions/stale@v10 16 | with: 17 | repo-token: ${{ secrets.GITHUB_TOKEN }} 18 | 19 | # DOCS https://github.com/actions/stale#all-options 20 | days-before-stale: 180 21 | days-before-close: 7 22 | stale-issue-label: "Stale" 23 | stale-issue-message: | 24 | This issue has been automatically marked as stale. 25 | **If this issue is still affecting you, please leave any comment**, for example "bump", and it will be kept open. 26 | close-issue-message: | 27 | This issue has been closed due to inactivity, and will not be monitored. 28 | -------------------------------------------------------------------------------- /.github/workflows/pr-title.yml: -------------------------------------------------------------------------------- 1 | name: PR title 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | - edited 8 | - synchronize 9 | - reopened 10 | - ready_for_review 11 | 12 | permissions: 13 | pull-requests: read 14 | 15 | jobs: 16 | semantic-pull-request: 17 | name: Check PR title 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: amannn/action-semantic-pull-request@v6 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | with: 24 | requireScope: false 25 | subjectPattern: ^(?![A-Z]).+$ # disallow title starting with capital 26 | types: | # add `improv` to the list of allowed types 27 | improv 28 | fix 29 | feat 30 | refactor 31 | build 32 | ci 33 | style 34 | test 35 | chore 36 | perf 37 | docs 38 | break 39 | revert 40 | -------------------------------------------------------------------------------- /.github/workflows/alfred-workflow-release.yml: -------------------------------------------------------------------------------- 1 | name: Alfred Workflow Release 2 | 3 | on: 4 | push: 5 | tags: ["*"] 6 | 7 | env: 8 | WORKFLOW_NAME: ${{ github.event.repository.name }} 9 | 10 | #─────────────────────────────────────────────────────────────────────────────── 11 | 12 | jobs: 13 | build: 14 | runs-on: macos-latest 15 | permissions: { contents: write } 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v6 19 | 20 | - name: Build .alfredworkflow 21 | run: | 22 | zip --recurse-paths --symlinks "${{ env.WORKFLOW_NAME }}.alfredworkflow" . \ 23 | --exclude "README.md" ".git*" "Justfile" ".build-and-release.sh" \ 24 | ".rsync-exclude" ".editorconfig" ".typos.toml" ".markdownlint.*" 25 | 26 | - name: Release 27 | uses: softprops/action-gh-release@v2 28 | with: 29 | token: ${{ secrets.GITHUB_TOKEN }} 30 | generate_release_notes: true 31 | files: ${{ env.WORKFLOW_NAME }}.alfredworkflow 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022-2023 Christopher Grieser 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/update-help-index.yml: -------------------------------------------------------------------------------- 1 | name: Update :help Search Index 2 | 3 | on: 4 | # twice per month (4:35 at the 2nd and 15th of the month) 5 | schedule: 6 | - cron: "35 4 2,15 * *" 7 | 8 | # triggering manually 9 | workflow_dispatch: {} 10 | 11 | # when this file or the script for re-indexing is changed 12 | push: 13 | branches: 14 | - main # prevents triggering on temporary branches created when making a release 15 | paths: 16 | - .github/workflows/update-help-index.yml 17 | - .github/help-index/create-index.sh 18 | 19 | permissions: 20 | contents: write 21 | 22 | #─────────────────────────────────────────────────────────────────────────────── 23 | 24 | jobs: 25 | build: 26 | runs-on: macos-latest 27 | steps: 28 | - uses: actions/checkout@v6 29 | - name: Update :help Search Index 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication 32 | run: | 33 | zsh ./.github/help-index/create-index.sh 34 | exit $? # inherit exit code 35 | - uses: stefanzweifel/git-auto-commit-action@v7 36 | with: 37 | commit_message: "chore: auto-update `:help` index" 38 | -------------------------------------------------------------------------------- /Justfile: -------------------------------------------------------------------------------- 1 | set quiet := true 2 | 3 | # REQUIRED local workflow uses same folder name 4 | 5 | workflow_uid := `basename "$PWD"` 6 | prefs_location := `defaults read com.runningwithcrayons.Alfred-Preferences syncfolder | sed "s|^~|$HOME|"` 7 | local_workflow := prefs_location / "Alfred.alfredpreferences/workflows" / workflow_uid 8 | 9 | #─────────────────────────────────────────────────────────────────────────────── 10 | 11 | transfer-changes-FROM-local: 12 | #!/usr/bin/env zsh 13 | rsync --archive --delete --exclude-from="$PWD/.rsync-exclude" "{{ local_workflow }}/" "$PWD" 14 | git status --short 15 | 16 | transfer-changes-TO-local: 17 | #!/usr/bin/env zsh 18 | rsync --archive --delete --exclude-from="$PWD/.rsync-exclude" "$PWD/" "{{ local_workflow }}" 19 | cd "{{ local_workflow }}" 20 | print "\e[1;34mChanges at the local workflow:\e[0m" 21 | git status --short . 22 | 23 | [macos] 24 | open-local-workflow-in-alfred: 25 | #!/usr/bin/env zsh 26 | # using JXA and URI for redundancy, as both are not 100 % reliable https://www.alfredforum.com/topic/18390-get-currently-edited-workflow-uri/ 27 | open "alfredpreferences://navigateto/workflows>workflow>{{ workflow_uid }}" 28 | osascript -e 'tell application id "com.runningwithcrayons.Alfred" to reveal workflow "{{ workflow_uid }}"' 29 | 30 | release: 31 | ./.build-and-release.sh 32 | -------------------------------------------------------------------------------- /vimdoc2html/vimhelp.css: -------------------------------------------------------------------------------- 1 | // Based on https://github.com/c4rlo/vimhelp/blob/master/static/vimhelp.css 2 | // by Carlo Teubner <(first name) dot (last name) at gmail dot com>. 3 | 4 | body { font-family: georgia, palatino, serif } 5 | 6 | pre { font-size: 11pt } 7 | 8 | #d1 { position: relative; display: table; margin: 0 auto } 9 | #d2 { position: absolute; top: inherit } 10 | 11 | #sp { visibility: hidden; height: 1px; margin: 0 } 12 | 13 | #footer { font-size: 85%; padding-top: 1em } 14 | 15 | /* hidden links */ 16 | a.d:link, a.d:visited { color: rgb(0,0,0); text-decoration: none; } 17 | a.d:active, a.d:hover { color: rgb(0,0,0); text-decoration: underline; } 18 | 19 | /* standard links */ 20 | a.l:link { color: rgb(0,137,139); } 21 | a.l:visited { color: rgb(0,100,100); } 22 | a.l:active, a.l:hover { color: rgb(0,200,200); } 23 | 24 | /* title */ 25 | .i { color: rgb(0, 137, 139); } 26 | 27 | /* tag */ 28 | .t { color: rgb(250,0,250); } 29 | 30 | /* header */ 31 | .h { color: rgb(164, 32, 246); } 32 | 33 | /* keystroke */ 34 | .k { color: rgb(106, 89, 205); } 35 | 36 | /* example */ 37 | .e { color: rgb(0, 0, 255); } 38 | 39 | /* special (used for various) */ 40 | .s { color: rgb(106, 89, 205); } 41 | 42 | /* note */ 43 | .n { color: blue; background-color: yellow; } 44 | 45 | /* option */ 46 | .o { color: rgb(46, 139, 87); font-weight: bold; } 47 | 48 | /* section */ 49 | .c { color: rgb(165, 42, 42); font-weight: bold; } 50 | 51 | /* external url */ 52 | .u { color: rgb(250,0,250); } 53 | -------------------------------------------------------------------------------- /.rumdl.toml: -------------------------------------------------------------------------------- 1 | # DOCS https://github.com/rvben/rumdl/blob/main/docs/global-settings.md 2 | 3 | [global] 4 | line-length = 80 5 | disable = [ 6 | "MD032", # blanks-around-lists: space waster 7 | ] 8 | 9 | # ------------------------------------------------------------------------------ 10 | 11 | [MD004] # ul-style 12 | style = "dash" # GitHub default & quicker to type 13 | 14 | [MD007] # ul-indent 15 | indent = 4 # consistent with .editorconfig 16 | 17 | [MD013] # line-length 18 | code-blocks = false 19 | reflow = true # enable auto-formatting 20 | 21 | [MD022] # blanks-around-headings 22 | lines-below = 0 # rule of proximity 23 | 24 | [MD029] # ol-prefix 25 | style = "ordered" 26 | 27 | [MD033] # inline-html 28 | # badges and `kbd` for hotkey instructions 29 | allowed-elements = ["a", "img", "kbd"] 30 | 31 | [MD049] # emphasis-style 32 | style = "asterisk" # better than underscore, since it's not considered a word-char 33 | 34 | [MD050] # strong-style 35 | style = "asterisk" # better than underscore, since it's not considered a word-char 36 | 37 | [MD060] # auto-format tables 38 | enabled = true # opt-in, since disabled by default 39 | 40 | [MD063] # heading-capitalization 41 | enabled = true # opt-in, since disabled by default 42 | style = "sentence_case" 43 | ignore-words = ["Alfred"] 44 | 45 | # ------------------------------------------------------------------------------ 46 | 47 | [per-file-ignores] 48 | # does not need to start with h1 49 | ".github/pull_request_template.md" = ["MD041"] 50 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: File a bug report 3 | title: "[Bug]: " 4 | labels: ["bug"] 5 | body: 6 | - type: textarea 7 | id: bug-description 8 | attributes: 9 | label: Bug Description 10 | description: A clear and concise description of the bug. 11 | validations: 12 | required: true 13 | - type: textarea 14 | id: screenshot 15 | attributes: 16 | label: Relevant Screenshot 17 | description: If applicable, add screenshots or a screen recording to help explain your problem. 18 | - type: textarea 19 | id: reproduction-steps 20 | attributes: 21 | label: To Reproduce 22 | description: Steps to reproduce the problem 23 | placeholder: | 24 | For example: 25 | 1. Go to '...' 26 | 2. Click on '...' 27 | 3. Scroll down to '...' 28 | - type: textarea 29 | id: debugging-log 30 | attributes: 31 | label: Debugging Log 32 | description: "You can get a debugging log by opening the workflow in Alfred preferences and pressing `⌘ + D`. A small window will open up which will log everything happening during the execution of the Workflow. Use the malfunctioning part of the workflow once more, copy the content of the log window, and paste it here. If the debugging log is long, please attach it as file instead of pasting everything in here." 33 | render: Text 34 | validations: 35 | required: true 36 | - type: textarea 37 | id: workflow-configuration 38 | attributes: 39 | label: Workflow Configuration 40 | description: "Please add a screenshot of all your [workflow configuration](https://www.alfredapp.com/help/workflows/user-configuration/)." 41 | validations: 42 | required: true 43 | - type: checkboxes 44 | id: checklist 45 | attributes: 46 | label: Checklist 47 | options: 48 | - label: I have [updated to the latest version](https://github.com/chrisgrieser/alfred-neovim-utilities/releases/latest) of this workflow. 49 | required: true 50 | -------------------------------------------------------------------------------- /scripts/nvim-recent-files.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript -l JavaScript 2 | ObjC.import("stdlib"); 3 | const app = Application.currentApplication(); 4 | app.includeStandardAdditions = true; 5 | //────────────────────────────────────────────────────────────────────────────── 6 | 7 | /** @param {string|string[]} item */ 8 | function camelCaseMatch(item) { 9 | if (typeof item === "string") item = [item]; 10 | return item 11 | .map((str) => { 12 | const subwords = str.replace(/[-_.]/g, " "); 13 | const fullword = str.replace(/[-_.]/g, ""); 14 | const camelCaseSeparated = str.replace(/([A-Z])/g, " $1"); 15 | return [subwords, camelCaseSeparated, fullword, str].join(" ") + " "; 16 | }) 17 | .join(" "); 18 | } 19 | 20 | const fileExists = (/** @type {string} */ filePath) => Application("Finder").exists(Path(filePath)); 21 | 22 | //────────────────────────────────────────────────────────────────────────────── 23 | 24 | /** @type {AlfredRun} */ 25 | // biome-ignore lint/correctness/noUnusedVariables: Alfred run 26 | function run() { 27 | const oldfilesRaw = app 28 | .doShellScript("zsh ./scripts/get-oldfiles.sh") 29 | .replace(/''|"/g, "") // term buffers with quotes (SIC shada escaped single quotes escaped by doubling them) 30 | .replaceAll("'", '"'); // single quotes illegal in JSON 31 | const oldfiles = JSON.parse(oldfilesRaw) 32 | .filter((/** @type {string} */ file) => { 33 | return file.startsWith("/") && !file.endsWith("COMMIT_EDITMSG") && fileExists(file); 34 | }) 35 | .map((/** @type {string} */ filepath) => { 36 | const fileName = filepath.split("/").pop(); 37 | const twoParents = filepath.replace(/.*\/(.*\/.*)\/.*$/, "$1"); 38 | 39 | return { 40 | title: fileName, 41 | match: camelCaseMatch(fileName), 42 | subtitle: "▸ " + twoParents, 43 | type: "file:skipcheck", 44 | icon: { type: "fileicon", path: filepath }, 45 | arg: filepath, 46 | }; 47 | }); 48 | 49 | return JSON.stringify({ 50 | items: oldfiles, 51 | cache: { 52 | seconds: 60, // quick, since often updated 53 | loosereload: true, 54 | }, 55 | }); 56 | } 57 | -------------------------------------------------------------------------------- /scripts/open-help.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript -l JavaScript 2 | ObjC.import("stdlib"); 3 | const app = Application.currentApplication(); 4 | app.includeStandardAdditions = true; 5 | //────────────────────────────────────────────────────────────────────────────── 6 | 7 | // JXA version does not work here, since it does not support `-L` 8 | const httpRequest = (/** @type {any} */ url) => app.doShellScript(`curl -sL ${url}`); 9 | 10 | /** @param {string} filepath @param {string} text */ 11 | function writeToFile(filepath, text) { 12 | const str = $.NSString.alloc.initWithUTF8String(text); 13 | str.writeToFileAtomicallyEncodingError(filepath, true, $.NSUTF8StringEncoding, null); 14 | } 15 | 16 | const fileExists = (/** @type {string} */ filePath) => Application("Finder").exists(Path(filePath)); 17 | 18 | // Using `open`, since `Application("Finder").open` does sometimes have permission issues 19 | const openFile = (/** @type {string} */ path) => app.doShellScript(`open "${path}"`); 20 | 21 | //────────────────────────────────────────────────────────────────────────────── 22 | 23 | /** @type {AlfredRun} */ 24 | // biome-ignore lint/correctness/noUnusedVariables: Alfred run 25 | function run(argv) { 26 | const repo = argv[0] || "ERROR"; 27 | const vimdocPath = `/tmp/neovim-vimdocs-${repo.replace(/\//g, "_")}.txt`; 28 | const htmlPath = vimdocPath + ".html"; 29 | 30 | // file is already cached 31 | if (fileExists(htmlPath)) { 32 | openFile(htmlPath); 33 | return; 34 | } 35 | 36 | // get file list 37 | const branch = JSON.parse(httpRequest(`https://api.github.com/repos/${repo}`)).default_branch; 38 | const worktreeUrl = `https://api.github.com/repos/${repo}/git/trees/${branch}?recursive=1`; 39 | const repoFiles = JSON.parse(httpRequest(worktreeUrl)).tree; 40 | 41 | // find the doc file 42 | const docFile = repoFiles.find((/** @type {{ path: string; }} */ file) => { 43 | const isDoc = file.path.startsWith("doc/") && file.path.endsWith(".txt"); 44 | const isChangelog = file.path.includes("change"); 45 | const otherCruff = 46 | repo === "nvim-telescope/telescope.nvim" && file.path.endsWith("secret.txt"); 47 | return isDoc && !isChangelog && !otherCruff; 48 | }); 49 | if (!docFile) return "No :help found for this repo."; 50 | const docUrl = `https://raw.githubusercontent.com/${repo}/${branch}/${docFile.path}`; 51 | 52 | // download vimdoc & convert to html 53 | writeToFile(vimdocPath, httpRequest(docUrl)); 54 | app.doShellScript(`python3 vimdoc2html/vimdoc2html.py "${vimdocPath}"`); 55 | openFile(htmlPath); 56 | } 57 | -------------------------------------------------------------------------------- /vimdoc2html/helpztags: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # 3 | # helpztags generates tags for Vim helpfiles, for both .txt and .txt.gz files 4 | # Author: Jakub Turski 5 | # Artur R. Czechowski 6 | # Version: 0.4 7 | # 8 | # xaizek: disallow bar symbol (|) in tags as Vim does 9 | # xaizek: warn about duplicated tags 10 | 11 | # Please use following command for generate a manual file: 12 | # pod2man -c "User Commands" -s 1 -q none -r "vim 6.2" -d "September 2003" helpztags helpztags.1 13 | 14 | =head1 NAME 15 | 16 | helpztags - generate the help tags file for directory 17 | 18 | =head1 SYNOPSIS 19 | 20 | helpztags F... 21 | 22 | =head1 DESCRIPTION 23 | 24 | F scans given directories for F<*.txt> and F<*.txt.gz> files. 25 | Each file is scanned for tags used in F help files. For each directory 26 | proper F file is generated. 27 | 28 | There should be at least one directory given. In other case program exits 29 | with error. 30 | 31 | =head1 AUTHORS 32 | 33 | Written by Jakub Turski and Artur R. Czechowski based on idea 34 | contained in C sources for its C<:helptags command>. 35 | 36 | =head1 REPORTING BUGS 37 | 38 | Please use a Debian C command or procedure described at 39 | C. 40 | 41 | =head1 SEE ALSO 42 | 43 | Read C<:help helptags> in F for detailed information about helptags. 44 | 45 | =cut 46 | 47 | use File::Glob ':globally'; 48 | use POSIX qw(getcwd); 49 | 50 | ($#ARGV==-1)&& die "Error: no directories given. Check manpage for details.\n"; 51 | 52 | $startdir=getcwd(); 53 | 54 | foreach $dir (@ARGV) { 55 | chdir $dir || die "Error: $dir: no such directory\n"; 56 | print "Processing ".$dir."\n"; 57 | open(TAGSFILE,">tags") || die "Error: Cannot open $dir/tags for writing.\n"; 58 | foreach $file (<*.{gz,txt}>) { 59 | do { open(GZ, "zcat $file|") if ($file =~ /\.gz$/) } or open(GZ,$file); 60 | while () { 61 | # From vim61/src/ex_cmds.c, lines 5034-5036 62 | # 63 | # Only accept a *tag* when it consists of valid 64 | # characters, there is no '-' before it and is followed 65 | # by a white character or end-of-line. 66 | while (/(? "./$file" 20 | done 21 | 22 | #─────────────────────────────────────────────────────────────────────────────── 23 | baseHelpURL="https://neovim.io/doc/user/" 24 | 25 | # OPTIONS 26 | vimoptions=$(grep --extended-regexp --only-matching "\*'[.A-Za-z-]{2,}'\*(.*'.*')?" options.txt | 27 | tr -d "*'" | 28 | while read -r line; do 29 | opt=$(echo "$line" | cut -d" " -f1) 30 | if [[ "$line" =~ " " ]]; then 31 | synonyms=",$(echo "$line" | cut -d" " -f2-)" 32 | else 33 | synonyms="" 34 | fi 35 | echo "${baseHelpURL}options.html#'$opt',$synonyms" 36 | done) 37 | if [[ -z "$vimoptions" ]]; then 38 | echo "Vim options creation failed." 39 | exit 1 40 | fi 41 | 42 | # ANCHORS 43 | anchors=$(grep --extended-regexp --only-matching --recursive "\*([()_.:A-Za-z-]+|[0-9E]+)\*(.*\*.*\*)?" | 44 | tr -d "*" | 45 | sed 's/txt:/html#/' | 46 | cut -c3- | 47 | while read -r line; do 48 | url=$(echo "$line" | cut -d" " -f1 | sed 's/:/%3A/') 49 | if [[ "$line" =~ " " ]]; then 50 | synonyms=",$(echo "$line" | cut -d" " -f2-)" 51 | else 52 | synonyms="" 53 | fi 54 | echo "${baseHelpURL}$url,$synonyms" 55 | done) 56 | if [[ -z "$anchors" ]]; then 57 | echo "Anchors creation failed." 58 | exit 1 59 | fi 60 | 61 | # SECTIONS 62 | sections=$(grep --extended-regexp --only-matching "\|[.0-9]*\|.*" usr_toc.txt | 63 | tr -d "|" | 64 | while read -r line; do 65 | file=$(echo "$line" | cut -c-2) 66 | title="$line" 67 | echo "${baseHelpURL}usr_$file.html#$title" 68 | done) 69 | if [[ -z "$sections" ]]; then 70 | echo "Section creation failed." 71 | exit 1 72 | fi 73 | 74 | #─────────────────────────────────────────────────────────────────────────────── 75 | 76 | cd .. || exit 1 77 | output=.github/help-index/neovim-help-index-urls.txt 78 | echo "$vimoptions" > "$output" 79 | echo "$anchors" >> "$output" 80 | echo "$sections" >> "$output" 81 | -------------------------------------------------------------------------------- /scripts/neovim-help-search.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript -l JavaScript 2 | ObjC.import("stdlib"); 3 | const app = Application.currentApplication(); 4 | app.includeStandardAdditions = true; 5 | //────────────────────────────────────────────────────────────────────────────── 6 | 7 | /** @param {string} str */ 8 | function camelCaseMatch(str) { 9 | const specialChars = /[-_.:]/g; 10 | const subwords = str.replace(specialChars, " "); 11 | const fullword = str.replace(specialChars, ""); 12 | const camelCaseSeparated = str.replace(/([A-Z])/g, " $1"); 13 | 14 | // e.g., so "setext" matches "nvim_buf_set_extmark()" 15 | const partial = str.replace(/^nvim_(win|buf)_/, "").replace(specialChars, ""); 16 | const partial2 = str.replace(/^nvim_/, "").replace(specialChars, ""); 17 | 18 | return [subwords, camelCaseSeparated, fullword, partial, partial2, str].join(" ") + " "; 19 | } 20 | 21 | /** @param {string} url @return {string} */ 22 | function httpRequest(url) { 23 | const queryUrl = $.NSURL.URLWithString(url); 24 | const data = $.NSData.dataWithContentsOfURL(queryUrl); 25 | return $.NSString.alloc.initWithDataEncoding(data, $.NSUTF8StringEncoding).js; 26 | } 27 | 28 | //────────────────────────────────────────────────────────────────────────────── 29 | /** @type {AlfredRun} */ 30 | // biome-ignore lint/correctness/noUnusedVariables: Alfred run 31 | function run() { 32 | const helpIndexUrl = 33 | "https://raw.githubusercontent.com/chrisgrieser/alfred-neovim-utilities/main/.github/help-index/neovim-help-index-urls.txt"; 34 | 35 | const items = httpRequest(helpIndexUrl) 36 | .split("\n") 37 | .map((url) => { 38 | const site = (url.split("/").pop() || "ERROR").split(".").shift(); 39 | let name = (url.split("#").pop() || "ERROR").replaceAll("%3A", ":").replaceAll("'", ""); 40 | let synonyms = ""; 41 | 42 | const hasSynonyms = url.includes(","); 43 | const isSection = url.includes("\t"); 44 | if (hasSynonyms) { 45 | synonyms = " " + url.split(",").pop(); 46 | url = url.split(",").shift() || "ERROR"; 47 | name = name.split(",").shift() || "ERROR"; 48 | } else if (isSection) { 49 | url = url.split("\t").shift() || "ERROR"; 50 | name = name.replace("\t", " "); 51 | } 52 | 53 | // matcher improvements 54 | let matcher = camelCaseMatch(name) + site + camelCaseMatch(synonyms); 55 | if (site === "vimfn") matcher += " fn"; 56 | if (name.includes("_hl")) matcher += " highlight"; 57 | 58 | return { 59 | title: name + synonyms, 60 | match: matcher, 61 | subtitle: site, 62 | arg: url, 63 | mods: { 64 | cmd: { arg: name }, // copy command/function name 65 | }, 66 | quicklookurl: url, 67 | uid: url, 68 | }; 69 | }); 70 | 71 | return JSON.stringify({ 72 | items: items, 73 | cache: { 74 | seconds: 3600 * 24 * 7, // every week 75 | loosereload: true, 76 | }, 77 | }); 78 | } 79 | -------------------------------------------------------------------------------- /vimdoc2html/vimdoc2html.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | #-*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2014 xaizek 5 | # 6 | # This file is part of vimdoc2html. 7 | # 8 | # vimdoc2html is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # vimdoc2html is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with vimdoc2html. If not, see . 20 | 21 | """\ 22 | Converts Vim documentation into HTML. 23 | 24 | Output is written to .html. 25 | 26 | As part of the process, tags file is created at the location of the source file. 27 | """ 28 | 29 | import argparse 30 | import io 31 | import os 32 | import os.path as path 33 | import subprocess 34 | 35 | import vimd2h 36 | 37 | TEMPLATE = u'''\ 38 | 39 | 40 | {title} 41 | 42 | 43 | 44 |
45 |         {html}
46 |         
47 | 48 | \ 49 | ''' 50 | 51 | script_dir = path.dirname(path.realpath(__file__)) 52 | 53 | # parse command-line arguments 54 | parser = argparse.ArgumentParser(description=__doc__) 55 | parser.add_argument('-r', '--raw', dest='raw', action='store_true', 56 | help="Don't wrap output into template") 57 | parser.add_argument('vimdoc', nargs=1, help='Vim documentation file') 58 | args = parser.parse_args() 59 | raw_output = args.raw 60 | src_filename = args.vimdoc[0] 61 | src_dir = path.dirname(src_filename) or '.' 62 | 63 | # generate tags file 64 | subprocess.call([path.join(script_dir, 'helpztags'), src_dir]) 65 | 66 | tags_path = path.join(src_dir, 'tags') 67 | css_path = path.join(script_dir, 'vimhelp.css') 68 | html_path = '%s.html' % src_filename; 69 | 70 | # read in all external files 71 | with io.open(tags_path, 'r', encoding='utf-8') as tags_file: 72 | tags = tags_file.read() 73 | with io.open(src_filename, 'r', encoding='utf-8') as doc_file: 74 | contents = doc_file.read() 75 | with io.open(css_path, 'r', encoding='utf-8') as css_file: 76 | style = css_file.read() 77 | 78 | # produce formatted html 79 | html = vimd2h.VimDoc2HTML(tags).to_html(contents) 80 | 81 | # output result 82 | with io.open(html_path, 'w', encoding='utf-8') as html_file: 83 | if raw_output: 84 | html_file.write(html) 85 | else: 86 | html_file.write( 87 | TEMPLATE.format(title=path.basename(src_filename), 88 | style=style, 89 | html=html)) 90 | -------------------------------------------------------------------------------- /scripts/search-mason-tools.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript -l JavaScript 2 | ObjC.import("stdlib"); 3 | const app = Application.currentApplication(); 4 | app.includeStandardAdditions = true; 5 | 6 | /** @param {string} str */ 7 | function alfredMatcher(str) { 8 | const clean = str.replace(/[-()_.:#/\\;,[\]]/g, " "); 9 | const camelCaseSeparated = str.replace(/([A-Z])/g, " $1"); 10 | return " " + [clean, camelCaseSeparated, str].join(" ") + " "; 11 | } 12 | 13 | const fileExists = (/** @type {string} */ filePath) => Application("Finder").exists(Path(filePath)); 14 | 15 | /** @param {string} path */ 16 | function readFile(path) { 17 | const data = $.NSFileManager.defaultManager.contentsAtPath(path); 18 | const str = $.NSString.alloc.initWithDataEncoding(data, $.NSUTF8StringEncoding); 19 | return ObjC.unwrap(str); 20 | } 21 | 22 | /** @typedef {Object} MasonPackage 23 | * @property {string} homepage 24 | * @property {string} name 25 | * @property {string[]} categories 26 | * @property {string[]} languages 27 | */ 28 | 29 | //────────────────────────────────────────────────────────────────────────────── 30 | 31 | /** @type {AlfredRun} */ 32 | // biome-ignore lint/correctness/noUnusedVariables: Alfred run 33 | function run() { 34 | // GUARD 35 | const masonLocation = $.getenv("mason_installation_path"); 36 | if (!masonLocation) { 37 | return JSON.stringify({ 38 | items: [ 39 | { 40 | title: "🚫 Mason Installation path not set.", 41 | subtitle: "Set the path in the Alfred workflow configuration.", 42 | valid: false, 43 | }, 44 | ], 45 | }); 46 | } 47 | if (!fileExists(masonLocation)) { 48 | return JSON.stringify({ 49 | items: [{ title: "🚫 Mason Installation does not exist.", valid: false }], 50 | }); 51 | } 52 | 53 | //─────────────────────────────────────────────────────────────────────────── 54 | 55 | const masonRegistryPath = 56 | masonLocation + "/registries/github/mason-org/mason-registry/registry.json"; 57 | const masonRegistry = JSON.parse(readFile(masonRegistryPath)); 58 | const installedTools = app.doShellScript(`cd "${masonLocation}/packages" && ls -1`).split("\r"); 59 | const masonIcon = "./mason-logo.png"; 60 | 61 | /** @type AlfredItem[] */ 62 | const availableTools = masonRegistry.map((/** @type {MasonPackage} */ tool) => { 63 | const installedIcon = installedTools.includes(tool.name) ? "✅ " : ""; 64 | const categoryList = tool.categories.join(", "); 65 | const languages = tool.languages.length > 0 ? tool.languages.join(", ") : ""; 66 | const separator = languages && categoryList ? " · " : ""; 67 | const subtitle = categoryList + separator + languages; 68 | 69 | return { 70 | title: installedIcon + tool.name, 71 | subtitle: subtitle, 72 | match: alfredMatcher(tool.name) + categoryList + " " + languages, 73 | arg: tool.homepage, 74 | quicklookurl: tool.homepage, 75 | icon: { path: masonIcon }, 76 | }; 77 | }); 78 | return JSON.stringify({ 79 | items: availableTools, 80 | cache: { 81 | seconds: 300, // faster, to update install icons 82 | loosereload: true, 83 | }, 84 | }); 85 | } 86 | -------------------------------------------------------------------------------- /.build-and-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | # goto git root 4 | cd "$(git rev-parse --show-toplevel)" || return 1 5 | 6 | #─────────────────────────────────────────────────────────────────────────────── 7 | 8 | # Prompt for next version number 9 | current_version=$(plutil -extract version xml1 -o - info.plist | sed -n 's/.*\(.*\)<\/string>.*/\1/p') 10 | echo "current version: $current_version" 11 | echo -n " next version: " 12 | read -r next_version 13 | echo "────────────────────────" 14 | 15 | # GUARD 16 | if [[ -z "$next_version" || "$next_version" == "$current_version" ]]; then 17 | print "\e[1;31mInvalid version number.\e[0m" 18 | return 1 19 | fi 20 | 21 | #─────────────────────────────────────────────────────────────────────────────── 22 | # update version number in THE REPO's `info.plist` 23 | plutil -replace version -string "$next_version" info.plist 24 | 25 | # update version number in LOCAL `info.plist` 26 | # INFO this assumes the local folder is named the same as the github repo 27 | 28 | # update version number in LOCAL `info.plist` 29 | prefs_location=$(defaults read com.runningwithcrayons.Alfred-Preferences syncfolder | sed "s|^~|$HOME|") 30 | workflow_uid="$(basename "$PWD")" 31 | local_info_plist="$prefs_location/Alfred.alfredpreferences/workflows/$workflow_uid/info.plist" 32 | if [[ -f "$local_info_plist" ]]; then 33 | plutil -replace version -string "$next_version" "$local_info_plist" 34 | else 35 | print "\e[1;33mCould not increment version, local \`info.plist\` not found: '$local_info_plist'\e[0m" 36 | return 1 37 | fi 38 | 39 | #─────────────────────────────────────────────────────────────────────────────── 40 | 41 | # copy download link for current version, to share it when closing issues 42 | msg="Available in the Alfred Gallery in 1-2 days, or directly by downloading the latest release here:" 43 | repo=$(git remote --verbose | head -n1 | sed -E 's/.*github.com:([^[:space:]]*).*/\1/') 44 | url="https://github.com/$repo/releases/download/$next_version/$workflow_uid.alfredworkflow" 45 | echo -n "$msg $url" | pbcopy 46 | 47 | #─────────────────────────────────────────────────────────────────────────────── 48 | 49 | # Submit update at Alfred Gallery 50 | last_release_commit=$(git log --grep="^release: " -n1 --pretty=format:"%H") 51 | if [[ -z "$last_release_commit" ]]; then 52 | root_commit=$(git rev-list --max-parents=0 HEAD) 53 | last_release_commit=$root_commit 54 | fi 55 | changelog=$(git log "$last_release_commit"..HEAD --format='- %s' | 56 | grep --extended-regexp --invert-match '^- (build|ci|release|chore|test|style)' | 57 | jq --raw-input --slurp --null-input --raw-output 'input | @uri') # url-encode 58 | if [[ -n "$changelog" ]]; then 59 | repo=$(git remote --verbose | head -n1 | sed -E 's/.*github.com:([^[:space:]]*).*/\1/') 60 | gallery_url="https://github.com/$repo" # github-url also okay for Alfred devs 61 | open "https://github.com/alfredapp/gallery-edits/issues/new?template=02_update_workflow.yml&title=Update+Workflow:+$repo&gallery_url=$gallery_url&new_version=$next_version&changelog=$changelog" 62 | else 63 | echo "Only internal changes, thus not submitting update at Alfred Gallery." 64 | echo 65 | fi 66 | 67 | #─────────────────────────────────────────────────────────────────────────────── 68 | 69 | # commit and push 70 | git add --all && 71 | git commit -m "release: $next_version" && 72 | git pull --no-progress && 73 | git push --no-progress && 74 | git tag "$next_version" && # pushing a tag triggers the github release action 75 | git push --no-progress origin --tags 76 | -------------------------------------------------------------------------------- /scripts/search-installed-plugins.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript -l JavaScript 2 | ObjC.import("stdlib"); 3 | const app = Application.currentApplication(); 4 | app.includeStandardAdditions = true; 5 | //────────────────────────────────────────────────────────────────────────────── 6 | 7 | /** @param {string} str */ 8 | function alfredMatcher(str) { 9 | const clean = str.replace(/[-()_.:#/\\;,[\]]/g, " "); 10 | const camelCaseSeparated = str.replace(/([A-Z])/g, " $1"); 11 | return " " + [clean, camelCaseSeparated, str].join(" ") + " "; 12 | } 13 | 14 | const fileExists = (/** @type {string} */ filePath) => Application("Finder").exists(Path(filePath)); 15 | 16 | /** @param {string} path */ 17 | function readFile(path) { 18 | const data = $.NSFileManager.defaultManager.contentsAtPath(path); 19 | const str = $.NSString.alloc.initWithDataEncoding(data, $.NSUTF8StringEncoding); 20 | return ObjC.unwrap(str); 21 | } 22 | 23 | //────────────────────────────────────────────────────────────────────────────── 24 | 25 | /** @type {AlfredRun} */ 26 | // biome-ignore lint/correctness/noUnusedVariables: Alfred run 27 | function run() { 28 | const pluginInstallPath = $.getenv("plugin_installation_path"); 29 | const masonLocation = $.getenv("mason_installation_path"); 30 | 31 | /** @type {AlfredItem[]} */ 32 | let pluginArray = []; 33 | let masonArray = []; 34 | 35 | if (pluginInstallPath && fileExists(pluginInstallPath)) { 36 | const shellCmd = `cd "${pluginInstallPath}" && grep --only-matching --no-filename --max-count=1 "http.*" ./*/.git/config`; 37 | pluginArray = app 38 | .doShellScript(shellCmd) 39 | .split("\r") 40 | .map((remote) => { 41 | const url = remote.replace(/\.git$/, ""); 42 | const repo = url.replace(/https?:\/\/github\.com\//, ""); 43 | const [owner, name] = repo.split("/"); 44 | const installPath = $.getenv("plugin_installation_path") + "/" + name; 45 | 46 | return { 47 | title: name, 48 | subtitle: owner, 49 | match: alfredMatcher(repo) + "plugin", 50 | arg: url, 51 | quicklookurl: url, 52 | mods: { 53 | cmd: { arg: repo }, 54 | fn: { arg: installPath }, 55 | }, 56 | uid: repo, 57 | }; 58 | }); 59 | } 60 | if (masonLocation && fileExists(masonLocation)) { 61 | const masonRegistryPath = 62 | masonLocation + "/registries/github/mason-org/mason-registry/registry.json"; 63 | const masonRegistry = JSON.parse(readFile(masonRegistryPath)); 64 | const installedTools = app.doShellScript(`cd "${masonLocation}/packages" && ls -1`).split("\r"); 65 | const masonIcon = "./mason-logo.png"; 66 | 67 | masonArray = masonRegistry 68 | .filter((/** @type {MasonPackage} */ tool) => installedTools.includes(tool.name)) 69 | .map((/** @type {MasonPackage} */ tool) => { 70 | const categoryList = tool.categories.join(", "); 71 | const languages = tool.languages.length > 0 ? tool.languages.join(", ") : ""; 72 | const separator = languages && categoryList ? " · " : ""; 73 | const subtitle = categoryList + separator + languages; 74 | const installPath = masonLocation + "/packages/" + tool.name; 75 | 76 | return { 77 | title: tool.name, 78 | subtitle: subtitle, 79 | match: alfredMatcher(tool.name) + categoryList, 80 | icon: { path: masonIcon }, 81 | arg: tool.homepage, 82 | quicklookurl: tool.homepage, 83 | uid: tool.name, 84 | mods: { 85 | cmd: { valid: false, subtitle: "🚫 Not for Mason Tool" }, 86 | shift: { valid: false, subtitle: "🚫 Not for Mason Tool" }, 87 | fn: { arg: installPath }, 88 | }, 89 | }; 90 | }); 91 | } 92 | 93 | return JSON.stringify({ 94 | items: [...pluginArray, ...masonArray], 95 | cache: { 96 | seconds: 15, // faster, since installs can change 97 | loosereload: true, 98 | }, 99 | }); 100 | } 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Neovim utilities for Alfred 2 | ![GitHub downloads](https://img.shields.io/github/downloads/chrisgrieser/alfred-neovim-utilities/total?label=GitHub%20Downloads&style=plastic&logo=github) 3 | ![Alfred Gallery downloads](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fchrisgrieser%2F.config%2Frefs%2Fheads%2Fmain%2FAlfred.alfredpreferences%2Falfred-gallery-downloads.yaml&query=neovim-utilities&style=plastic&logo=alfred&label=Gallery%20Downloads&color=%235C1F87) 4 | ![Latest release](https://img.shields.io/github/v/release/chrisgrieser/alfred-neovim-utilities?label=Latest%20Release&style=plastic) 5 | 6 | Search [neovim plugins](https://github.com/rockerBOO/awesome-neovim) and 7 | the [online :help](https://neovim.io/doc/) via [Alfred](https://www.alfredapp.com/). 8 | 9 | ![Showcase help search](https://github.com/chrisgrieser/alfred-neovim-utilities/assets/73286100/5c0fc2a3-bcd2-4f29-b67b-e0a2d813e4d6) 10 | ![Showcase plugin search](https://github.com/chrisgrieser/alfred-neovim-utilities/assets/73286100/c519b303-729b-4df2-aa28-76b107f29b5e) 11 | 12 | ## Commands 13 | - `:h`: Search the Neovim [online :help](https://neovim.io/doc/). 14 | - : Open the respective help. 15 | - ⌥⏎: Copy the help URL. 16 | - ⌘⏎: Copy the command or function name. 17 | - `np`: Search [store.nvim](https://github.com/alex-popov-tech/store.nvim) for 18 | Neovim plugins (mnemonic: `[n]vim [p]lugins`). 19 | - : Open the GitHub repo. 20 | - ⌘⏎: Open the `:help` page in the browser (`vimdoc` converted to 21 | HTML). 22 | - ⌥⏎: Copy the GitHub URL. 23 | - `ip`: Search for locally installed plugins and `mason.nvim` packages 24 | (mnemonic: `[i]installed [p]lugins`). 25 | - The modifiers (⌘⌥) from the plugin-search also apply for this 26 | command. 27 | - In addition, fn⏎: Open the local directory of the plugin in 28 | Finder. 29 | - `mason`: Search for tools available via 30 | [mason.nvim](https://github.com/williamboman/mason.nvim). 31 | - `:old`: Displays and searches your `:oldfiles`. Opens them in the system's 32 | default editor for the respective filetype. (To open them directly in Neovim, 33 | you need a Neovim GUI with the `Open With` capability, such as 34 | [Neovide](http://neovide.dev).) 35 | 36 | > [!NOTE] 37 | > All keywords are customizable in the workflow settings. 38 | 39 | ## Installation 40 | - **Requirements:** [Alfred 5.5](https://www.alfredapp.com/) (macOS only) with 41 | Powerpack. 42 | - Download the [latest release from the Alfred 43 | Gallery](https://alfred.app/workflows/chrisgrieser/neovim-utilities/). 44 | - For the preview pane, install 45 | [alfred-extra-pane](https://github.com/mr-pennyworth/alfred-extra-pane). 46 | 47 | ## Preview pane configuration 48 | The demo screenshot uses the following 49 | [configuration](https://github.com/mr-pennyworth/alfred-extra-pane?tab=readme-ov-file#configuration) 50 | for the preview pane: 51 | 52 | ```json 53 | [ 54 | { 55 | "workflowUID": "*", 56 | "alignment": { 57 | "horizontal": { "placement": "right", "width": 450, "minHeight": 750 } 58 | } 59 | } 60 | ] 61 | ``` 62 | 63 | ## Credits 64 | - Plugin database provided by 65 | [@alex-popov-tech's store.nvim](https://github.com/alex-popov-tech/store.nvim) 66 | - `vimdoc` to HTML conversion by [@xaizek's 67 | vimdoc2html](https://github.com/xaizek/vimdoc2html). 68 | - Preview pane by [@mr-pennyworth's 69 | alfred-extra-pane](https://github.com/mr-pennyworth/alfred-extra-pane). 70 | - Logo by 71 | [@thomascannon](https://github.com/neovim/neovim/issues/43#issuecomment-35811450). 72 | 73 | ## About the developer 74 | In my day job, I am a sociologist studying the social mechanisms underlying the 75 | digital economy. For my PhD project, I investigate the governance of the app 76 | economy and how software ecosystems manage the tension between innovation and 77 | compatibility. If you are interested in this subject, feel free to get in touch. 78 | 79 | - [Website](https://chris-grieser.de/) 80 | - [Mastodon](https://pkm.social/@pseudometa) 81 | - [ResearchGate](https://www.researchgate.net/profile/Christopher-Grieser) 82 | - [LinkedIn](https://www.linkedin.com/in/christopher-grieser-ba693b17a/) 83 | 84 | Buy Me a Coffee at ko-fi.com 87 | -------------------------------------------------------------------------------- /scripts/search-nvim-plugins.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript -l JavaScript 2 | ObjC.import("stdlib"); 3 | const app = Application.currentApplication(); 4 | app.includeStandardAdditions = true; 5 | //────────────────────────────────────────────────────────────────────────────── 6 | 7 | /** @param {string} str */ 8 | function alfredMatcher(str) { 9 | const clean = str.replace(/[-_./]/g, " "); 10 | const camelCaseSeparated = str.replace(/([A-Z])/g, " $1"); 11 | return [clean, camelCaseSeparated, str].join(" ") + " "; 12 | } 13 | 14 | /** @param {string} url @return {string} */ 15 | function httpRequest(url) { 16 | const queryUrl = $.NSURL.URLWithString(url); 17 | const data = $.NSData.dataWithContentsOfURL(queryUrl); 18 | return $.NSString.alloc.initWithDataEncoding(data, $.NSUTF8StringEncoding).js; 19 | } 20 | 21 | const fileExists = (/** @type {string} */ filePath) => Application("Finder").exists(Path(filePath)); 22 | 23 | function ensureCacheFolderExists() { 24 | const finder = Application("Finder"); 25 | const cacheDir = $.getenv("alfred_workflow_cache"); 26 | if (finder.exists(Path(cacheDir))) return; 27 | console.log("Cache directory does not exist and is created."); 28 | const cacheDirBasename = $.getenv("alfred_workflow_bundleid"); 29 | const cacheDirParent = cacheDir.slice(0, -cacheDirBasename.length); 30 | finder.make({ 31 | new: "folder", 32 | at: Path(cacheDirParent), 33 | withProperties: { name: cacheDirBasename }, 34 | }); 35 | } 36 | 37 | /** @param {string} path */ 38 | function cacheIsOutdated(path) { 39 | const cacheAgeThresholdHours = 12; // CONFIG 40 | const cacheObj = Application("System Events").aliases[path]; 41 | if (!cacheObj.exists()) return true; 42 | const cacheAgeHours = (Date.now() - cacheObj.creationDate().getTime()) / 1000 / 60 / 60; 43 | return cacheAgeHours > cacheAgeThresholdHours; 44 | } 45 | 46 | /** @param {string} filepath @param {string} text */ 47 | function writeToFile(filepath, text) { 48 | const str = $.NSString.alloc.initWithUTF8String(text); 49 | str.writeToFileAtomicallyEncodingError(filepath, true, $.NSUTF8StringEncoding, null); 50 | } 51 | 52 | /** @param {string} path */ 53 | function readFile(path) { 54 | const data = $.NSFileManager.defaultManager.contentsAtPath(path); 55 | const str = $.NSString.alloc.initWithDataEncoding(data, $.NSUTF8StringEncoding); 56 | return ObjC.unwrap(str); 57 | } 58 | 59 | //────────────────────────────────────────────────────────────────────────────── 60 | 61 | // INFO Using the crawler result of `store.nvim`, since it is it includes more 62 | // plugins that awesome-neovim, and neovimcraft and dotfyle only include plugins 63 | // that are in the awesome-neovim 64 | // SOURCE https://github.com/alex-popov-tech/store.nvim/blob/main/lua/store/config.lua 65 | // SOURCE https://github.com/alex-popov-tech/store.nvim.crawler/issues/1#issuecomment-3146734037 66 | const storeNvimList = 67 | "https://gist.githubusercontent.com/alex-popov-tech/92d1366bfeb168d767153a24be1475b5/raw/db.json"; 68 | 69 | /** @typedef {Object} StoreNvimRepo 70 | * @property {string} source 71 | * @property {string} full_name 72 | * @property {string} author 73 | * @property {string} name 74 | * @property {string} url 75 | * @property {string} description 76 | * @property {string[]} tags 77 | * @property {number} stars 78 | * @property {number} issues 79 | * @property {string} created_at ISO date string 80 | * @property {string} updated_at ISO date string 81 | * @property {{stars: string, issues: string, created_at: string, updated_at: string}} pretty 82 | * @property {string} readme 83 | */ 84 | 85 | /** @typedef {Object} StoreNvimData 86 | * @property {StoreNvimRepo[]} items 87 | * @property {{created_at: number}} meta 88 | */ 89 | //─────────────────────────────────────────────────────────────────────────── 90 | 91 | /** 92 | * @param {(AlfredItem & {fullRepo: string})[]} alfredItems 93 | * @return {AlfredItem[]} updated items 94 | */ 95 | function addIconsForInstalledPlugins(alfredItems) { 96 | const pluginInstallPath = $.getenv("plugin_installation_path"); 97 | if (!fileExists(pluginInstallPath)) return alfredItems; 98 | 99 | let /** @type {string[]} */ installedPlugins = []; 100 | const shellCmd = `cd "${pluginInstallPath}" && grep --only-matching --no-filename --max-count=1 "http.*" ./*/.git/config`; 101 | installedPlugins = app 102 | .doShellScript(shellCmd) 103 | .split("\r") 104 | .map((remote) => { 105 | const ownerAndName = remote.split("/").slice(3, 5).join("/").slice(0, -4); 106 | return ownerAndName; 107 | }); 108 | 109 | const updatedItems = alfredItems.map((item) => { 110 | if (installedPlugins.includes(item.fullRepo)) item.title += " ✅"; 111 | return item; 112 | }); 113 | return updatedItems; 114 | } 115 | 116 | //────────────────────────────────────────────────────────────────────────────── 117 | 118 | /** @type {AlfredRun} */ 119 | // biome-ignore lint/correctness/noUnusedVariables: Alfred run 120 | function run() { 121 | ensureCacheFolderExists(); 122 | const cachePath = $.getenv("alfred_workflow_cache") + "/nvimPluginsAlfredItems.json"; 123 | 124 | // use cached items (PERF not using Alfred's caching, so install icons can be updated) 125 | if (!cacheIsOutdated(cachePath)) { 126 | const alfredItems = JSON.parse(readFile(cachePath)); 127 | const itemsWithInstallIcons = addIconsForInstalledPlugins(alfredItems); 128 | return JSON.stringify({ items: itemsWithInstallIcons }); 129 | } 130 | 131 | // fetch data 132 | let /** @type {StoreNvimData} */ nvimStoreData; 133 | try { 134 | nvimStoreData = JSON.parse(httpRequest(storeNvimList)); 135 | } catch (_error) { 136 | const errItem = { title: "Cannot retrieve data", valid: false }; 137 | return JSON.stringify({ items: [errItem] }); 138 | } 139 | console.log("Fetched new data from store.nvim."); 140 | console.log("Last crawl:", new Date(nvimStoreData.meta.created_at).toLocaleString()); 141 | console.log("Total plugins:", nvimStoreData.items.length); 142 | 143 | // construct Alfred items 144 | const alfredItems = nvimStoreData.items 145 | .sort((a, b) => new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime()) 146 | .map((repo) => { 147 | // biome-ignore format: does not need to be read so often 148 | const { full_name, description, url, pretty, tags, author, name } = repo; 149 | 150 | const subtitle = ["⭐ " + pretty.stars, author, pretty.updated_at, description] 151 | .filter(Boolean) 152 | .join(" · "); 153 | 154 | /** @type {(AlfredItem & {fullRepo: string})} */ 155 | const item = { 156 | title: name, 157 | fullRepo: full_name, // just for adding of the install icon adding 158 | match: alfredMatcher([name, author, ...tags].join(" ")), 159 | subtitle: subtitle, 160 | arg: url, 161 | mods: { 162 | cmd: { arg: full_name }, // open help page 163 | }, 164 | quicklookurl: url, 165 | }; 166 | return item; 167 | }); 168 | writeToFile(cachePath, JSON.stringify(alfredItems)); 169 | 170 | const itemsWithInstallIcons = addIconsForInstalledPlugins(alfredItems); 171 | return JSON.stringify({ items: itemsWithInstallIcons }); 172 | } 173 | -------------------------------------------------------------------------------- /vimdoc2html/vimd2h.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | #-*- coding: utf-8 -*- 3 | 4 | # converts vim documentation to html 5 | 6 | # Based on https://github.com/c4rlo/vimhelp/blob/master/vimh2h.py 7 | # by Carlo Teubner <(first name) dot (last name) at gmail dot com>. 8 | 9 | import re 10 | from itertools import chain 11 | 12 | try: 13 | import urllib.parse as urllib 14 | except: 15 | import urllib 16 | 17 | RE_TAGLINE = re.compile(r'(\S+)\s+(\S+)') 18 | 19 | PAT_WORDCHAR = '[!#-)+-{}~\xC0-\xFF]' 20 | 21 | PAT_HEADER = r'(^.*~$)' 22 | PAT_GRAPHIC = r'(^.* `$)' 23 | PAT_PIPEWORD = r'(?=@]|<[A-Za-z]+?>)?)' 28 | PAT_SPECIAL = r'(<.*?>|\{.*?}|' \ 29 | r'\[(?:range|line|count|offset|\+?cmd|[-+]?num|\+\+opt|' \ 30 | r'arg|arguments|ident|addr|group)]|' \ 31 | r'(?<=\s)\[[-a-z^A-Z0-9_]{2,}])' 32 | PAT_TITLE = r'(Vim version [0-9.a-z]+|VIM REFERENCE.*)' 33 | PAT_NOTE = r'((? \t]+[a-zA-Z0-9/])' 36 | PAT_WORD = r'((?$') 59 | RE_EG_END = re.compile(r'\S') 60 | RE_SECTION = re.compile(r'[-A-Z .][-A-Z0-9 .()]*(?=\s+\*)') 61 | RE_STARTAG = re.compile(r'\s\*([^ \t|]+)\*(?:\s|$)') 62 | RE_LOCAL_ADD = re.compile(r'LOCAL ADDITIONS:\s+\*local-additions\*$') 63 | 64 | class Link(object): 65 | __slots__ = 'link_pipe', 'link_plain' 66 | 67 | def __init__(self, link_pipe, link_plain): 68 | self.link_pipe = link_pipe 69 | self.link_plain = link_plain 70 | 71 | class VimDoc2HTML(object): 72 | def __init__(self, tags, version=None): 73 | self._urls = { } 74 | self._urlsCI = { } 75 | self._version = version 76 | for line in RE_NEWLINE.split(tags): 77 | m = RE_TAGLINE.match(line) 78 | if m: 79 | tag, filename = m.group(1, 2) 80 | self.do_add_tag(filename, tag) 81 | 82 | def do_add_tag(self, filename, tag): 83 | part1 = '' 86 | link_pipe = part1 + ' class="l"' + part2 87 | classattr = ' class="d"' 88 | m = RE_LINKWORD.match(tag) 89 | if m: 90 | opt, ctrl, special = m.groups() 91 | if opt is not None: classattr = ' class="o"' 92 | elif ctrl is not None: classattr = ' class="k"' 93 | elif special is not None: classattr = ' class="s"' 94 | link_plain = part1 + classattr + part2 95 | self._urls[tag] = Link(link_pipe, link_plain) 96 | self._urlsCI[tag.lower()] = True 97 | 98 | def maplink(self, tag, css_class=None): 99 | links = self._urls.get(tag) 100 | if links is not None: 101 | if css_class == 'l': return links.link_pipe 102 | else: return links.link_plain 103 | elif css_class is not None: 104 | if css_class == 'l': 105 | lowerTag = tag.lower() 106 | if lowerTag in self._urlsCI: 107 | print('Unresolved reference: |%s|' % tag) 108 | for key in self._urls: 109 | if key.lower() == lowerTag: 110 | print(' - tag with different case: |%s|' % key) 111 | else: 112 | print('Unresolved reference: |%s|' % tag) 113 | 114 | return '' + html_escape[tag] + \ 115 | '' 116 | else: return html_escape[tag] 117 | 118 | def to_html(self, contents): 119 | out = [ ] 120 | 121 | inexample = 0 122 | for line in RE_NEWLINE.split(contents): 123 | line = line.rstrip('\r\n') 124 | line_tabs = line 125 | line = line.expandtabs() 126 | if RE_HRULE.match(line): 127 | out.extend(('', line, '\n')) 128 | continue 129 | if inexample == 2: 130 | if RE_EG_END.match(line): 131 | inexample = 0 132 | if line[0] == '<': line = line[1:] 133 | else: 134 | out.extend(('', html_escape[line], 135 | '\n')) 136 | continue 137 | if RE_EG_START.match(line_tabs): 138 | inexample = 1 139 | line = line[0:-1] 140 | if RE_SECTION.match(line_tabs): 141 | m = RE_SECTION.match(line) 142 | out.extend((r'', m.group(0), r'')) 143 | line = line[m.end():] 144 | lastpos = 0 145 | for match in RE_TAGWORD.finditer(line): 146 | pos = match.start() 147 | if pos > lastpos: 148 | out.append(html_escape[line[lastpos:pos]]) 149 | lastpos = match.end() 150 | header, graphic, pipeword, starword, command, opt, ctrl, \ 151 | special, title, note, url, word = match.groups() 152 | if pipeword is not None: 153 | out.append(self.maplink(pipeword, 'l')) 154 | elif starword is not None: 155 | quoted = urllib.quote_plus(starword) 156 | out.extend(('', html_escape[starword], '')) 158 | elif command is not None: 159 | out.extend(('', html_escape[command], 160 | '')) 161 | elif opt is not None: 162 | out.append(self.maplink(opt, 'o')) 163 | elif ctrl is not None: 164 | out.append(self.maplink(ctrl, 'k')) 165 | elif special is not None: 166 | out.append(self.maplink(special, 's')) 167 | elif title is not None: 168 | out.extend(('', html_escape[title], 169 | '')) 170 | elif note is not None: 171 | out.extend(('', html_escape[note], 172 | '')) 173 | elif header is not None: 174 | out.extend(('', html_escape[header[:-1]], 175 | '')) 176 | elif graphic is not None: 177 | out.append(html_escape[graphic[:-2]]) 178 | elif url is not None: 179 | out.extend(('' + 180 | html_escape[url], '')) 181 | elif word is not None: 182 | out.append(self.maplink(word)) 183 | if lastpos < len(line): 184 | out.append(html_escape[line[lastpos:]]) 185 | out.append('\n') 186 | if inexample == 1: inexample = 2 187 | 188 | header = [] 189 | return ''.join(chain(header, out)) 190 | 191 | class HtmlEscCache(dict): 192 | def __missing__(self, key): 193 | r = key.replace('&', '&') \ 194 | .replace('<', '<') \ 195 | .replace('>', '>') 196 | self[key] = r 197 | return r 198 | 199 | html_escape = HtmlEscCache() 200 | -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleid 6 | de.chris-grieser.neovim-utilities 7 | category 8 | ⭐️ 9 | connections 10 | 11 | 02145BDB-6F80-437E-A4FE-880FDA77AC47 12 | 13 | 14 | destinationuid 15 | D6E5E105-38E3-4BC1-90E3-52BEE556349D 16 | modifiers 17 | 524288 18 | modifiersubtext 19 | ⌥: Copy GitHub URL 20 | vitoclose 21 | 22 | 23 | 24 | destinationuid 25 | 6BBC3DF6-1094-4623-B790-2B5EF7C16EEE 26 | modifiers 27 | 0 28 | modifiersubtext 29 | 30 | vitoclose 31 | 32 | 33 | 34 | destinationuid 35 | 26EB4BCF-56A8-43E4-AED6-0C121B00D55E 36 | modifiers 37 | 1048576 38 | modifiersubtext 39 | ⌘: Open the :help in the browser (vimdoc converted to html) 40 | vitoclose 41 | 42 | 43 | 44 | 14ECFC26-C670-4D39-9A5C-C24B452554F2 45 | 46 | 47 | destinationuid 48 | FB617FEA-F94F-4A13-8327-5EC723FD66AB 49 | modifiers 50 | 0 51 | modifiersubtext 52 | 53 | vitoclose 54 | 55 | 56 | 57 | destinationuid 58 | 15317DBA-B342-4CB9-9F08-0CBA70D39C07 59 | modifiers 60 | 524288 61 | modifiersubtext 62 | ⌥: Copy to Clipboard 63 | vitoclose 64 | 65 | 66 | 67 | destinationuid 68 | 15B20F5E-E701-4582-A8A9-E390689BE4A9 69 | modifiers 70 | 1048576 71 | modifiersubtext 72 | ⌘: Copy command or function name 73 | vitoclose 74 | 75 | 76 | 77 | 15317DBA-B342-4CB9-9F08-0CBA70D39C07 78 | 79 | 80 | destinationuid 81 | 38E62E4E-8B37-483B-BBE3-257C2DD7EA30 82 | modifiers 83 | 0 84 | modifiersubtext 85 | 86 | vitoclose 87 | 88 | 89 | 90 | 15B20F5E-E701-4582-A8A9-E390689BE4A9 91 | 92 | 93 | destinationuid 94 | 15317DBA-B342-4CB9-9F08-0CBA70D39C07 95 | modifiers 96 | 0 97 | modifiersubtext 98 | 99 | vitoclose 100 | 101 | 102 | 103 | 26EB4BCF-56A8-43E4-AED6-0C121B00D55E 104 | 105 | 106 | destinationuid 107 | F5BC25CE-C34C-4EF9-B428-71EDB9170948 108 | modifiers 109 | 0 110 | modifiersubtext 111 | 112 | vitoclose 113 | 114 | 115 | 116 | 38E62E4E-8B37-483B-BBE3-257C2DD7EA30 117 | 118 | 6BBC3DF6-1094-4623-B790-2B5EF7C16EEE 119 | 120 | 6EBCF2CC-4936-48C4-BCD8-42A7B39BDEDC 121 | 122 | 123 | destinationuid 124 | F178F3ED-E855-4DC9-A178-D839E9C2C48D 125 | modifiers 126 | 0 127 | modifiersubtext 128 | 129 | vitoclose 130 | 131 | 132 | 133 | 711DEF51-292E-4367-94F7-C38BEF4B6FB6 134 | 135 | 136 | destinationuid 137 | D6E5E105-38E3-4BC1-90E3-52BEE556349D 138 | modifiers 139 | 524288 140 | modifiersubtext 141 | ⌥: Copy URL 142 | vitoclose 143 | 144 | 145 | 146 | destinationuid 147 | 6BBC3DF6-1094-4623-B790-2B5EF7C16EEE 148 | modifiers 149 | 0 150 | modifiersubtext 151 | 152 | vitoclose 153 | 154 | 155 | 156 | destinationuid 157 | 26EB4BCF-56A8-43E4-AED6-0C121B00D55E 158 | modifiers 159 | 1048576 160 | modifiersubtext 161 | ⌘: Open the :help in the browser (vimdoc converted to html) 162 | vitoclose 163 | 164 | 165 | 166 | destinationuid 167 | D818D50E-55A9-45FB-AC92-10FCF4BC8B60 168 | modifiers 169 | 8388608 170 | modifiersubtext 171 | fn: Open Repo in Finder 172 | vitoclose 173 | 174 | 175 | 176 | C906BF1E-7CF4-4407-9B97-53532876DCC0 177 | 178 | 179 | destinationuid 180 | D6E5E105-38E3-4BC1-90E3-52BEE556349D 181 | modifiers 182 | 524288 183 | modifiersubtext 184 | ⌥: Copy URL 185 | vitoclose 186 | 187 | 188 | 189 | destinationuid 190 | 6BBC3DF6-1094-4623-B790-2B5EF7C16EEE 191 | modifiers 192 | 0 193 | modifiersubtext 194 | 195 | vitoclose 196 | 197 | 198 | 199 | D6E5E105-38E3-4BC1-90E3-52BEE556349D 200 | 201 | 202 | destinationuid 203 | ACDBE56D-DF34-4CC2-B97C-B13DD486D083 204 | modifiers 205 | 0 206 | modifiersubtext 207 | 208 | vitoclose 209 | 210 | 211 | 212 | D818D50E-55A9-45FB-AC92-10FCF4BC8B60 213 | 214 | F178F3ED-E855-4DC9-A178-D839E9C2C48D 215 | 216 | F5BC25CE-C34C-4EF9-B428-71EDB9170948 217 | 218 | 219 | createdby 220 | Chris Grieser 221 | description 222 | Search neovim plugins and online :help 223 | disabled 224 | 225 | name 226 | Neovim Utilities 227 | objects 228 | 229 | 230 | config 231 | 232 | browser 233 | 234 | skipqueryencode 235 | 236 | skipvarencode 237 | 238 | spaces 239 | 240 | url 241 | 242 | 243 | type 244 | alfred.workflow.action.openurl 245 | uid 246 | FB617FEA-F94F-4A13-8327-5EC723FD66AB 247 | version 248 | 1 249 | 250 | 251 | config 252 | 253 | alfredfiltersresults 254 | 255 | alfredfiltersresultsmatchmode 256 | 2 257 | argumenttreatemptyqueryasnil 258 | 259 | argumenttrimmode 260 | 0 261 | argumenttype 262 | 1 263 | escaping 264 | 102 265 | keyword 266 | {var:help_search} 267 | queuedelaycustom 268 | 3 269 | queuedelayimmediatelyinitially 270 | 271 | queuedelaymode 272 | 0 273 | queuemode 274 | 1 275 | runningsubtext 276 | loading... 277 | script 278 | 279 | scriptargtype 280 | 1 281 | scriptfile 282 | scripts/neovim-help-search.js 283 | subtext 284 | 285 | title 286 | Search neovim :help 287 | type 288 | 8 289 | withspace 290 | 291 | 292 | type 293 | alfred.workflow.input.scriptfilter 294 | uid 295 | 14ECFC26-C670-4D39-9A5C-C24B452554F2 296 | version 297 | 3 298 | 299 | 300 | config 301 | 302 | autopaste 303 | 304 | clipboardtext 305 | {query} 306 | ignoredynamicplaceholders 307 | 308 | transient 309 | 310 | 311 | type 312 | alfred.workflow.output.clipboard 313 | uid 314 | 15317DBA-B342-4CB9-9F08-0CBA70D39C07 315 | version 316 | 3 317 | 318 | 319 | config 320 | 321 | lastpathcomponent 322 | 323 | onlyshowifquerypopulated 324 | 325 | removeextension 326 | 327 | text 328 | {query} 329 | title 330 | 📋 Copied 331 | 332 | type 333 | alfred.workflow.output.notification 334 | uid 335 | 38E62E4E-8B37-483B-BBE3-257C2DD7EA30 336 | version 337 | 1 338 | 339 | 340 | type 341 | alfred.workflow.utility.junction 342 | uid 343 | 15B20F5E-E701-4582-A8A9-E390689BE4A9 344 | version 345 | 1 346 | 347 | 348 | config 349 | 350 | alfredfiltersresults 351 | 352 | alfredfiltersresultsmatchmode 353 | 2 354 | argumenttreatemptyqueryasnil 355 | 356 | argumenttrimmode 357 | 0 358 | argumenttype 359 | 1 360 | escaping 361 | 0 362 | keyword 363 | {var:old_search} 364 | queuedelaycustom 365 | 3 366 | queuedelayimmediatelyinitially 367 | 368 | queuedelaymode 369 | 0 370 | queuemode 371 | 1 372 | runningsubtext 373 | loading... 374 | script 375 | 376 | scriptargtype 377 | 1 378 | scriptfile 379 | scripts/nvim-recent-files.js 380 | subtext 381 | 382 | title 383 | Vim :oldfiles 384 | type 385 | 8 386 | withspace 387 | 388 | 389 | type 390 | alfred.workflow.input.scriptfilter 391 | uid 392 | 6EBCF2CC-4936-48C4-BCD8-42A7B39BDEDC 393 | version 394 | 3 395 | 396 | 397 | config 398 | 399 | openwith 400 | 401 | sourcefile 402 | 403 | 404 | type 405 | alfred.workflow.action.openfile 406 | uid 407 | F178F3ED-E855-4DC9-A178-D839E9C2C48D 408 | version 409 | 3 410 | 411 | 412 | config 413 | 414 | alfredfiltersresults 415 | 416 | alfredfiltersresultsmatchmode 417 | 2 418 | argumenttreatemptyqueryasnil 419 | 420 | argumenttrimmode 421 | 0 422 | argumenttype 423 | 1 424 | escaping 425 | 0 426 | keyword 427 | {var:plugin_search} 428 | queuedelaycustom 429 | 3 430 | queuedelayimmediatelyinitially 431 | 432 | queuedelaymode 433 | 0 434 | queuemode 435 | 1 436 | runningsubtext 437 | loading... 438 | script 439 | 440 | scriptargtype 441 | 1 442 | scriptfile 443 | scripts/search-nvim-plugins.js 444 | subtext 445 | 446 | title 447 | Search Neovim Plugin 448 | type 449 | 8 450 | withspace 451 | 452 | 453 | type 454 | alfred.workflow.input.scriptfilter 455 | uid 456 | 02145BDB-6F80-437E-A4FE-880FDA77AC47 457 | version 458 | 3 459 | 460 | 461 | config 462 | 463 | autopaste 464 | 465 | clipboardtext 466 | {query} 467 | ignoredynamicplaceholders 468 | 469 | transient 470 | 471 | 472 | type 473 | alfred.workflow.output.clipboard 474 | uid 475 | D6E5E105-38E3-4BC1-90E3-52BEE556349D 476 | version 477 | 3 478 | 479 | 480 | config 481 | 482 | lastpathcomponent 483 | 484 | onlyshowifquerypopulated 485 | 486 | removeextension 487 | 488 | text 489 | {query} 490 | title 491 | 📋 Copied 492 | 493 | type 494 | alfred.workflow.output.notification 495 | uid 496 | ACDBE56D-DF34-4CC2-B97C-B13DD486D083 497 | version 498 | 1 499 | 500 | 501 | config 502 | 503 | browser 504 | 505 | skipqueryencode 506 | 507 | skipvarencode 508 | 509 | spaces 510 | 511 | url 512 | 513 | 514 | type 515 | alfred.workflow.action.openurl 516 | uid 517 | 6BBC3DF6-1094-4623-B790-2B5EF7C16EEE 518 | version 519 | 1 520 | 521 | 522 | config 523 | 524 | alfredfiltersresults 525 | 526 | alfredfiltersresultsmatchmode 527 | 2 528 | argumenttreatemptyqueryasnil 529 | 530 | argumenttrimmode 531 | 0 532 | argumenttype 533 | 1 534 | escaping 535 | 0 536 | keyword 537 | {var:mason_tool_search} 538 | queuedelaycustom 539 | 3 540 | queuedelayimmediatelyinitially 541 | 542 | queuedelaymode 543 | 0 544 | queuemode 545 | 1 546 | runningsubtext 547 | loading... 548 | script 549 | 550 | scriptargtype 551 | 1 552 | scriptfile 553 | scripts/search-mason-tools.js 554 | subtext 555 | 556 | title 557 | Search Mason Tools Plugin 558 | type 559 | 8 560 | withspace 561 | 562 | 563 | type 564 | alfred.workflow.input.scriptfilter 565 | uid 566 | C906BF1E-7CF4-4407-9B97-53532876DCC0 567 | version 568 | 3 569 | 570 | 571 | config 572 | 573 | alfredfiltersresults 574 | 575 | alfredfiltersresultsmatchmode 576 | 2 577 | argumenttreatemptyqueryasnil 578 | 579 | argumenttrimmode 580 | 0 581 | argumenttype 582 | 1 583 | escaping 584 | 0 585 | keyword 586 | {var:installed_plugin_search} 587 | queuedelaycustom 588 | 3 589 | queuedelayimmediatelyinitially 590 | 591 | queuedelaymode 592 | 0 593 | queuemode 594 | 1 595 | runningsubtext 596 | loading... 597 | script 598 | 599 | scriptargtype 600 | 1 601 | scriptfile 602 | scripts/search-installed-plugins.js 603 | subtext 604 | 605 | title 606 | Search Installed Plugin 607 | type 608 | 8 609 | withspace 610 | 611 | 612 | type 613 | alfred.workflow.input.scriptfilter 614 | uid 615 | 711DEF51-292E-4367-94F7-C38BEF4B6FB6 616 | version 617 | 3 618 | 619 | 620 | config 621 | 622 | concurrently 623 | 624 | escaping 625 | 0 626 | script 627 | 628 | scriptargtype 629 | 1 630 | scriptfile 631 | scripts/open-help.js 632 | type 633 | 8 634 | 635 | type 636 | alfred.workflow.action.script 637 | uid 638 | 26EB4BCF-56A8-43E4-AED6-0C121B00D55E 639 | version 640 | 2 641 | 642 | 643 | config 644 | 645 | lastpathcomponent 646 | 647 | onlyshowifquerypopulated 648 | 649 | removeextension 650 | 651 | text 652 | 653 | title 654 | ⚠️ {query} 655 | 656 | type 657 | alfred.workflow.output.notification 658 | uid 659 | F5BC25CE-C34C-4EF9-B428-71EDB9170948 660 | version 661 | 1 662 | 663 | 664 | config 665 | 666 | openwith 667 | 668 | sourcefile 669 | 670 | 671 | type 672 | alfred.workflow.action.openfile 673 | uid 674 | D818D50E-55A9-45FB-AC92-10FCF4BC8B60 675 | version 676 | 3 677 | 678 | 679 | readme 680 | ## Commands 681 | - `:h`: Search the Neovim [online :help](https://neovim.io/doc/). 682 | + <kbd>⏎</kbd>: Open the respective help. 683 | + <kbd>⌥⏎</kbd>: Copy the help URL. 684 | + <kbd>⌘⏎</kbd>: Copy the command or function name. 685 | - `np`: Search [store.nvim](https://github.com/alex-popov-tech/store.nvim) 686 | for Neovim plugins (mnemonic: `[n]vim [p]lugins`). 687 | + <kbd>⏎</kbd>: Open the GitHub repo. 688 | + <kbd>⌘⏎</kbd>: Open the `:help` page in the browser (`vimdoc` converted to 689 | HTML). 690 | + <kbd>⌥⏎</kbd>: Copy the GitHub URL. 691 | - `ip`: Search for locally installed plugins and `mason.nvim` packages 692 | (mnemonic: `[i]installed [p]lugins`). 693 | + The modifiers (<kbd>⌘⌥</kbd>) from the plugin-search also apply for this 694 | command. 695 | + In addition, <kbd>fn⏎</kbd>: Open the local directory of the plugin in 696 | Finder. 697 | - `mason`: Search for tools available via 698 | [mason.nvim](https://github.com/williamboman/mason.nvim). 699 | - `:old`: Displays and searches your `:oldfiles`. Opens them in the system's 700 | default editor for the respective filetype. (To open them directly in Neovim, 701 | you need a Neovim GUI with the `Open With` capability, such as 702 | [Neovide](http://neovide.dev).) 703 | 704 | ## Preview Pane 705 | For the preview pane, install [mr-pennyworth/alfred-extra-pane](https://github.com/mr-pennyworth/alfred-extra-pane). 706 | 707 | ## Bug reports, feature requests or just leave a star? 708 | ➡️ [GitHub Repo](https://github.com/chrisgrieser/alfred-neovim-utilities/) 709 | 710 | ## Credits 711 | - <!-- harper: ignore -->Plugin database provided by 712 | [awesome-neovim](https://github.com/rockerBOO/awesome-neovim), and 713 | [@alex-popov-tech's store.nvim](https://github.com/alex-popov-tech/store.nvim) 714 | - `vimdoc` to HTML conversion by [@xaizek's 715 | vimdoc2html](https://github.com/xaizek/vimdoc2html). 716 | - Preview pane by [@mr-pennyworth's 717 | alfred-extra-pane](https://github.com/mr-pennyworth/alfred-extra-pane). 718 | - Logo by 719 | [@thomascannon](https://github.com/neovim/neovim/issues/43#issuecomment-35811450). 720 | 721 | --- 722 | 723 | Workflow created by [Chris Grieser](https://chris-grieser.de/). 724 | uidata 725 | 726 | 02145BDB-6F80-437E-A4FE-880FDA77AC47 727 | 728 | colorindex 729 | 3 730 | note 731 | online plugin search 732 | xpos 733 | 35 734 | ypos 735 | 400 736 | 737 | 14ECFC26-C670-4D39-9A5C-C24B452554F2 738 | 739 | colorindex 740 | 9 741 | note 742 | neovim docs 743 | xpos 744 | 35 745 | ypos 746 | 20 747 | 748 | 15317DBA-B342-4CB9-9F08-0CBA70D39C07 749 | 750 | colorindex 751 | 9 752 | xpos 753 | 320 754 | ypos 755 | 135 756 | 757 | 15B20F5E-E701-4582-A8A9-E390689BE4A9 758 | 759 | colorindex 760 | 9 761 | xpos 762 | 230 763 | ypos 764 | 165 765 | 766 | 26EB4BCF-56A8-43E4-AED6-0C121B00D55E 767 | 768 | colorindex 769 | 3 770 | note 771 | open help page 772 | xpos 773 | 310 774 | ypos 775 | 685 776 | 777 | 38E62E4E-8B37-483B-BBE3-257C2DD7EA30 778 | 779 | colorindex 780 | 9 781 | xpos 782 | 470 783 | ypos 784 | 135 785 | 786 | 6BBC3DF6-1094-4623-B790-2B5EF7C16EEE 787 | 788 | colorindex 789 | 3 790 | xpos 791 | 455 792 | ypos 793 | 535 794 | 795 | 6EBCF2CC-4936-48C4-BCD8-42A7B39BDEDC 796 | 797 | colorindex 798 | 7 799 | note 800 | recent files 801 | xpos 802 | 35 803 | ypos 804 | 255 805 | 806 | 711DEF51-292E-4367-94F7-C38BEF4B6FB6 807 | 808 | colorindex 809 | 2 810 | note 811 | installed plugins and mason tools search 812 | xpos 813 | 35 814 | ypos 815 | 685 816 | 817 | ACDBE56D-DF34-4CC2-B97C-B13DD486D083 818 | 819 | colorindex 820 | 3 821 | xpos 822 | 605 823 | ypos 824 | 400 825 | 826 | C906BF1E-7CF4-4407-9B97-53532876DCC0 827 | 828 | colorindex 829 | 11 830 | note 831 | installed plugins and mason tools search 832 | xpos 833 | 35 834 | ypos 835 | 535 836 | 837 | D6E5E105-38E3-4BC1-90E3-52BEE556349D 838 | 839 | colorindex 840 | 3 841 | note 842 | copy url 843 | xpos 844 | 455 845 | ypos 846 | 400 847 | 848 | D818D50E-55A9-45FB-AC92-10FCF4BC8B60 849 | 850 | colorindex 851 | 2 852 | note 853 | open local folder 854 | xpos 855 | 310 856 | ypos 857 | 830 858 | 859 | F178F3ED-E855-4DC9-A178-D839E9C2C48D 860 | 861 | colorindex 862 | 7 863 | xpos 864 | 220 865 | ypos 866 | 255 867 | 868 | F5BC25CE-C34C-4EF9-B428-71EDB9170948 869 | 870 | colorindex 871 | 3 872 | note 873 | no default branch 874 | xpos 875 | 455 876 | ypos 877 | 685 878 | 879 | FB617FEA-F94F-4A13-8327-5EC723FD66AB 880 | 881 | colorindex 882 | 9 883 | xpos 884 | 320 885 | ypos 886 | 20 887 | 888 | 889 | userconfigurationconfig 890 | 891 | 892 | config 893 | 894 | default 895 | :h 896 | placeholder 897 | :help 898 | required 899 | 900 | trim 901 | 902 | 903 | description 904 | For searching the official neovim documentation (online, not inside nvim). 905 | label 906 | Keyword – online :help 907 | type 908 | textfield 909 | variable 910 | help_search 911 | 912 | 913 | config 914 | 915 | default 916 | np 917 | placeholder 918 | 919 | required 920 | 921 | trim 922 | 923 | 924 | description 925 | 926 | label 927 | Keyword – neovim plugin search 928 | type 929 | textfield 930 | variable 931 | plugin_search 932 | 933 | 934 | config 935 | 936 | default 937 | :old 938 | placeholder 939 | 940 | required 941 | 942 | trim 943 | 944 | 945 | description 946 | For searching recent files (:help oldfiles). 947 | label 948 | Keyword – oldfiles 949 | type 950 | textfield 951 | variable 952 | old_search 953 | 954 | 955 | config 956 | 957 | default 958 | ip 959 | placeholder 960 | 961 | required 962 | 963 | trim 964 | 965 | 966 | description 967 | For searching installed plugins & mason tools. 968 | label 969 | Keyword – installed plugins 970 | type 971 | textfield 972 | variable 973 | installed_plugin_search 974 | 975 | 976 | config 977 | 978 | default 979 | mason 980 | placeholder 981 | mason 982 | required 983 | 984 | trim 985 | 986 | 987 | description 988 | For searching all tools available via mason. 989 | label 990 | Keyword – mason tools 991 | type 992 | textfield 993 | variable 994 | mason_tool_search 995 | 996 | 997 | config 998 | 999 | default 1000 | ~/.local/share/nvim/lazy 1001 | filtermode 1002 | 1 1003 | placeholder 1004 | ~/.local/share/nvim/lazy 1005 | required 1006 | 1007 | 1008 | description 1009 | Path where the "start" and "opt" folder are located, mostly depending on the plugin manager you use. Default value is the default path for lazy.nvim. Required for searching installed plugins. 1010 | label 1011 | Plugin Installation Path 1012 | type 1013 | filepicker 1014 | variable 1015 | plugin_installation_path 1016 | 1017 | 1018 | config 1019 | 1020 | default 1021 | ~/.local/share/nvim/mason 1022 | filtermode 1023 | 1 1024 | placeholder 1025 | ~/.local/share/nvim/mason 1026 | required 1027 | 1028 | 1029 | description 1030 | Path where mason.nvim installs its tools. Default value is the default path for mason.nvim. Required for any mason-related feature of this plugin. 1031 | label 1032 | Mason Installation Path 1033 | type 1034 | filepicker 1035 | variable 1036 | mason_installation_path 1037 | 1038 | 1039 | version 1040 | 2.7.0 1041 | webaddress 1042 | https://chris-grieser.de/ 1043 | 1044 | 1045 | -------------------------------------------------------------------------------- /vimdoc2html/COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------