Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Saghen/blink.cmp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.6
Choose a base ref
...
head repository: Saghen/blink.cmp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 13,981 additions and 3,395 deletions.
  1. +7 −8 .github/ISSUE_TEMPLATE/bug_report.yml
  2. +32 −0 .github/workflows/docs.yaml
  3. +0 −21 .github/workflows/nix-build.yaml
  4. +38 −0 .github/workflows/nix.yaml
  5. +31 −0 .github/workflows/panvimdoc.yaml
  6. +32 −0 .github/workflows/release.yaml
  7. +25 −0 .github/workflows/spelling.yaml
  8. +29 −0 .github/workflows/stylua.yaml
  9. +3 −0 .gitignore
  10. +1 −0 .stylua.toml
  11. +437 −1 CHANGELOG.md
  12. +97 −105 Cargo.lock
  13. +5 −5 Cargo.toml
  14. +16 −891 README.md
  15. +0 −10 ROADMAP.md
  16. +17 −0 _typos.toml
  17. +13 −2 build.rs
  18. +3 −0 doc/.gitignore
  19. +5 −0 doc/.prettierrc
  20. +77 −0 doc/.vitepress/config.mts
  21. +14 −0 doc/.vitepress/theme/index.ts
  22. +35 −0 doc/.vitepress/theme/style.css
  23. +2,371 −0 doc/blink-cmp.txt
  24. +32 −0 doc/configuration/appearance.md
  25. +304 −0 doc/configuration/completion.md
  26. +30 −0 doc/configuration/fuzzy.md
  27. +71 −0 doc/configuration/general.md
  28. +169 −0 doc/configuration/keymap.md
  29. +620 −0 doc/configuration/reference.md
  30. +18 −0 doc/configuration/signature.md
  31. +119 −0 doc/configuration/snippets.md
  32. +86 −0 doc/configuration/sources.md
  33. +9 −0 doc/development/architecture.md
  34. +6 −6 LSP_TRACKER.md → doc/development/lsp-tracker.md
  35. +3 −0 doc/development/writing-sources.md
  36. +56 −0 doc/index.md
  37. +144 −0 doc/installation.md
  38. +2,525 −0 doc/package-lock.json
  39. +15 −0 doc/package.json
  40. BIN doc/public/favicon.png
  41. +380 −0 doc/recipes.md
  42. +25 −0 doc/vimdoc.md
  43. +9 −9 flake.lock
  44. +53 −34 flake.nix
  45. +1 −2 lua/blink-cmp.lua
  46. +13 −0 lua/blink/cmp/commands.lua
  47. +49 −21 lua/blink/cmp/completion/accept/init.lua
  48. +13 −4 lua/blink/cmp/completion/accept/preview.lua
  49. +15 −1 lua/blink/cmp/completion/brackets/config.lua
  50. +12 −9 lua/blink/cmp/completion/brackets/kind.lua
  51. +4 −2 lua/blink/cmp/completion/brackets/semantic.lua
  52. +17 −1 lua/blink/cmp/completion/brackets/utils.lua
  53. +26 −3 lua/blink/cmp/completion/init.lua
  54. +130 −45 lua/blink/cmp/completion/list.lua
  55. +1 −1 lua/blink/cmp/completion/prefetch.lua
  56. +0 −237 lua/blink/cmp/completion/trigger.lua
  57. +125 −0 lua/blink/cmp/completion/trigger/context.lua
  58. +269 −0 lua/blink/cmp/completion/trigger/init.lua
  59. +57 −30 lua/blink/cmp/completion/windows/documentation.lua
  60. +56 −16 lua/blink/cmp/completion/windows/ghost_text.lua
  61. +29 −12 lua/blink/cmp/completion/windows/menu.lua
  62. +7 −5 lua/blink/cmp/completion/windows/render/column.lua
  63. +24 −12 lua/blink/cmp/completion/windows/render/context.lua
  64. +45 −33 lua/blink/cmp/completion/windows/render/init.lua
  65. +23 −9 lua/blink/cmp/completion/windows/render/tailwind.lua
  66. +7 −4 lua/blink/cmp/completion/windows/render/text.lua
  67. +0 −3 lua/blink/cmp/completion/windows/render/treesitter.lua
  68. +5 −3 lua/blink/cmp/completion/windows/render/types.lua
  69. +1 −1 lua/blink/cmp/config/appearance.lua
  70. +13 −7 lua/blink/cmp/config/completion/accept.lua
  71. +18 −5 lua/blink/cmp/config/completion/documentation.lua
  72. +13 −1 lua/blink/cmp/config/completion/ghost_text.lua
  73. +1 −1 lua/blink/cmp/config/completion/init.lua
  74. +2 −10 lua/blink/cmp/config/completion/keyword.lua
  75. +23 −13 lua/blink/cmp/config/completion/list.lua
  76. +52 −28 lua/blink/cmp/config/completion/menu.lua
  77. +10 −7 lua/blink/cmp/config/completion/trigger.lua
  78. +49 −8 lua/blink/cmp/config/fuzzy.lua
  79. +96 −38 lua/blink/cmp/config/init.lua
  80. +56 −19 lua/blink/cmp/config/keymap.lua
  81. +72 −0 lua/blink/cmp/config/modes/cmdline.lua
  82. +70 −0 lua/blink/cmp/config/modes/term.lua
  83. +19 −0 lua/blink/cmp/config/modes/types.lua
  84. +17 −4 lua/blink/cmp/config/signature.lua
  85. +51 −6 lua/blink/cmp/config/snippets.lua
  86. +87 −41 lua/blink/cmp/config/sources.lua
  87. +93 −0 lua/blink/cmp/config/types_partial.lua
  88. +30 −6 lua/blink/cmp/config/utils.lua
  89. +0 −217 lua/blink/cmp/fuzzy/download.lua
  90. +181 −0 lua/blink/cmp/fuzzy/download/files.lua
  91. +70 −0 lua/blink/cmp/fuzzy/download/git.lua
  92. +179 −0 lua/blink/cmp/fuzzy/download/init.lua
  93. +117 −0 lua/blink/cmp/fuzzy/download/system.lua
  94. +44 −0 lua/blink/cmp/fuzzy/error.rs
  95. +22 −60 lua/blink/cmp/fuzzy/frecency.rs
  96. +96 −76 lua/blink/cmp/fuzzy/fuzzy.rs
  97. +84 −35 lua/blink/cmp/fuzzy/init.lua
  98. +90 −0 lua/blink/cmp/fuzzy/keyword.rs
  99. +92 −46 lua/blink/cmp/fuzzy/lib.rs
  100. +20 −3 lua/blink/cmp/fuzzy/lsp_item.rs
  101. +52 −0 lua/blink/cmp/fuzzy/sort.lua
  102. +53 −8 lua/blink/cmp/health.lua
  103. +4 −2 lua/blink/cmp/highlights.lua
  104. +201 −31 lua/blink/cmp/init.lua
  105. +98 −16 lua/blink/cmp/keymap/apply.lua
  106. +10 −5 lua/blink/cmp/keymap/fallback.lua
  107. +47 −3 lua/blink/cmp/keymap/init.lua
  108. +11 −3 lua/blink/cmp/keymap/presets.lua
  109. +74 −17 lua/blink/cmp/lib/async.lua
  110. +97 −46 lua/blink/cmp/lib/buffer_events.lua
  111. +104 −0 lua/blink/cmp/lib/cmdline_events.lua
  112. +93 −0 lua/blink/cmp/lib/term_events.lua
  113. +241 −31 lua/blink/cmp/lib/text_edits.lua
  114. +112 −42 lua/blink/cmp/lib/utils.lua
  115. +36 −140 lua/blink/cmp/lib/window/docs.lua
  116. +138 −32 lua/blink/cmp/lib/window/init.lua
  117. +24 −2 lua/blink/cmp/lib/window/scrollbar/geometry.lua
  118. +9 −42 lua/blink/cmp/lib/window/scrollbar/init.lua
  119. +30 −2 lua/blink/cmp/lib/window/scrollbar/win.lua
  120. +4 −2 lua/blink/cmp/signature/init.lua
  121. +25 −11 lua/blink/cmp/signature/trigger.lua
  122. +10 −7 lua/blink/cmp/signature/window.lua
  123. 0 lua/blink/cmp/snippets.lua
  124. +27 −23 lua/blink/cmp/sources/buffer.lua
  125. +42 −0 lua/blink/cmp/sources/cmdline/constants.lua
  126. +53 −0 lua/blink/cmp/sources/cmdline/help.lua
  127. +167 −0 lua/blink/cmp/sources/cmdline/init.lua
  128. +0 −155 lua/blink/cmp/sources/lib/context.lua
  129. +101 −74 lua/blink/cmp/sources/lib/init.lua
  130. +15 −8 lua/blink/cmp/sources/lib/provider/config.lua
  131. +89 −72 lua/blink/cmp/sources/lib/provider/init.lua
  132. +128 −0 lua/blink/cmp/sources/lib/provider/list.lua
  133. +3 −1 lua/blink/cmp/sources/lib/provider/override.lua
  134. +67 −0 lua/blink/cmp/sources/lib/queue.lua
  135. +169 −0 lua/blink/cmp/sources/lib/tree.lua
  136. +5 −6 lua/blink/cmp/sources/lib/types.lua
  137. +0 −49 lua/blink/cmp/sources/lib/utils.lua
  138. +0 −249 lua/blink/cmp/sources/lsp.lua
  139. +75 −0 lua/blink/cmp/sources/lsp/completion.lua
  140. +92 −0 lua/blink/cmp/sources/lsp/hacks/docs.lua
  141. +173 −0 lua/blink/cmp/sources/lsp/init.lua
  142. +171 −0 lua/blink/cmp/sources/omni.lua
  143. +4 −8 lua/blink/cmp/sources/path/fs.lua
  144. +16 −10 lua/blink/cmp/sources/path/init.lua
  145. +50 −11 lua/blink/cmp/sources/path/lib.lua
  146. +34 −0 lua/blink/cmp/sources/path/regex.lua
  147. +1 −1 lua/blink/cmp/sources/snippets/{ → default}/builtin.lua
  148. +64 −0 lua/blink/cmp/sources/snippets/default/init.lua
  149. +32 −26 lua/blink/cmp/sources/snippets/{ → default}/registry.lua
  150. 0 lua/blink/cmp/sources/snippets/{ → default}/scan.lua
  151. +6 −61 lua/blink/cmp/sources/snippets/init.lua
  152. +46 −19 lua/blink/cmp/sources/{ → snippets}/luasnip.lua
  153. +143 −0 lua/blink/cmp/sources/snippets/mini_snippets.lua
  154. +34 −2 lua/blink/cmp/sources/snippets/utils.lua
  155. +4 −1 lua/blink/cmp/types.lua
  156. +5 −0 plugin/blink-cmp.lua
  157. +34 −0 repro.lua
15 changes: 7 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -7,14 +7,15 @@ body:
attributes:
label: Make sure you have done the following
options:
- label: I have updated to the latest version of `blink.cmp`
- label: Updated to the latest version of `blink.cmp`
required: true
- label: I have read the README
- label: Searched for existing issues and documentation (try `<C-k>` on https://cmp.saghen.dev)
required: true
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: If the issue may be related to your configuration, please include a [repro.lua](https://github.com/Saghen/blink.cmp/blob/main/repro.lua)
validations: { required: true }
- type: textarea
id: user-config
@@ -24,20 +25,18 @@ body:
render: lua
placeholder: |
sources = {
completion = {
enabled_providers = { "lsp", "path", "snippets", "buffer" },
},
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
validations: { required: false }
- type: input
id: version-info
attributes:
label: neovim version
label: "`neovim` version"
placeholder: "output of `nvim --version`"
validations: { required: true }
- type: input
id: branch-or-tag
attributes:
label: "`blink.cmp` version: branch, tag, or commit"
placeholder: "for example: main or v0.4.0"
label: "`blink.cmp` version"
placeholder: "examples: main, d2b411c or v0.9.2"
validations: { required: true }
32 changes: 32 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy `main` docs

on:
push:
branches:
- main

jobs:
deploy-docs:
if: github.repository == 'Saghen/blink.cmp'
name: Deploy docs
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-node@v4

- name: Build
run: npm ci && npm run build
working-directory: doc

- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy doc/.vitepress/dist --project-name=blink-cmp-main
21 changes: 0 additions & 21 deletions .github/workflows/nix-build.yaml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test Nix

on:
push:
pull_request:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
name: Test Nix Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
accept-flake-config = true
- name: Check the flake
run: nix flake check

- name: Build devshell
run: nix develop --command "rustc"

- name: Build the library
run: nix build .#blink-fuzzy-lib

- name: Build the plugin in nix
run: nix build .#blink-cmp

- name: Build the library (outside nix)
run: nix run .#build-plugin
31 changes: 31 additions & 0 deletions .github/workflows/panvimdoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# TODO: doesn't handle `::: warning` blocks
# TODO: doesn't handle links to other files

name: Update vimdocs

on:
push:
branches: [main]
paths:
- doc/**
- .github/workflows/panvimdoc.yaml

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: kdheepak/panvimdoc@main
with:
vimdoc: blink-cmp
pandoc: doc/vimdoc.md
version: NVIM v0.10.0
shiftheadinglevelby: 0
incrementheadinglevelby: 0
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: update vimdocs"
branch: ${{ github.head_ref }}
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -49,6 +49,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install Rust
run: |
@@ -92,6 +94,12 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Generate checksums
run: |
for file in ./**/*; do
sha256sum "$file" > "${file}.sha256"
done
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
with:
@@ -102,3 +110,27 @@ jobs:
draft: false
prerelease: false
generate_release_notes: true

deploy-docs:
name: Deploy docs
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-node@v4

- name: Build
run: npm ci && npm run build:release
working-directory: doc

- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy doc/.vitepress/dist --project-name=blink-cmp
25 changes: 25 additions & 0 deletions .github/workflows/spelling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Spelling

permissions:
contents: read

on:
push:
branches:
- main
pull_request:

env:
CLICOLOR: 1

jobs:
spelling:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Spell Check Repo
uses: crate-ci/typos@685eb3d55be2f85191e8c84acb9f44d7756f84ab # v1.29.4
29 changes: 29 additions & 0 deletions .github/workflows/stylua.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Stylua

permissions:
contents: read

on:
push:
branches:
- main
pull_request:

env:
CLICOLOR: 1

jobs:
stylua:
name: Check lua files using Stylua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Stylua Check Repo
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color=always --check lua
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
target/
.archive.lua
_*.lua
.lazy.lua
dual/
result
.direnv
.devenv
.repro/
.wrangler/
1 change: 1 addition & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
syntax = "LuaJIT"
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
Loading