-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
206 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
return { | ||
_all = { | ||
coverage = false, | ||
lpath = "lua/?.lua;lua/?/init.lua", | ||
cpath = ".luarocks/lib/lua/5.1/?.so", | ||
lua = "nlua", | ||
}, | ||
default = { | ||
verbose = true, | ||
}, | ||
tests = { | ||
verbose = true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ name: Test Nix Build | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ dual/ | |
result | ||
.direnv | ||
.devenv | ||
.luarocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
local MODREV, SPECREV = "scm", "-1" | ||
rockspec_format = "3.0" | ||
package = "blink.cmp" | ||
version = MODREV .. SPECREV | ||
|
||
description = { | ||
summary = "Performant, batteries-included completion plugin for Neovim", | ||
labels = { "neovim" }, | ||
homepage = "https://github.com/Saghen/blink.cmp", | ||
license = "MIT", | ||
} | ||
|
||
source = { | ||
url = "http://github.com/Saghen/blink-cmp/archive/v" .. MODREV .. ".zip", | ||
} | ||
|
||
if MODREV == "scm" then | ||
source = { | ||
url = "git://github.com/Saghen/blink-cmp", | ||
} | ||
end | ||
|
||
dependencies = { | ||
"lua == 5.1", | ||
} | ||
|
||
test_dependencies = { | ||
"nlua", | ||
} | ||
|
||
build_dependencies = { | ||
"luarocks-build-rust-mlua", | ||
} | ||
|
||
build = { | ||
type = "rust-mlua", | ||
modules = { | ||
"blink_cmp_fuzzy", | ||
}, | ||
install = { | ||
lua = { | ||
["blink-cmp.init"] = "lua/blink-cmp.lua", | ||
}, | ||
}, | ||
features = { "lua51" } | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe("rust-mlua library", function() | ||
it("can load blink_cmp_fuzzy module", function() | ||
require("blink_cmp_fuzzy") | ||
end) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
local tempdir = vim.fn.tempname() | ||
vim.system({ "rm", "-r", tempdir }):wait() | ||
vim.system({ "mkdir", "-p", tempdir }):wait() | ||
|
||
describe("blink.cmp.fuzzy", function() | ||
local fuzzy = require("blink.cmp.fuzzy") | ||
it("init_db", function() | ||
local db_path = vim.fs.joinpath(tempdir, "fuzzy.db") | ||
fuzzy.init_db(db_path) | ||
assert.is_not_nil(vim.uv.fs_stat(db_path)) | ||
end) | ||
it("get_words", function() | ||
local result = fuzzy.get_words("first\nsecond\tthird") | ||
table.sort(result) -- make sure it's not flaky | ||
assert.same({"first", "second", "third"}, result) | ||
end) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe("setup", function() | ||
it("can setup", function() | ||
require("blink.cmp").setup {}; | ||
end) | ||
end) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
bash -c "mkdir -p .luarocks" | ||
luarocks make --tree=.luarocks --deps-mode=all | ||
eval "$(luarocks --tree=.luarocks path --append)" | ||
luarocks test |