Select the types of activity you want to include in your feed.
Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins.
git.anhgelus.world/anhgelus/dotfiles
···3333 implementation = "prefer_rust_with_warning",
3434 max_typos = function(keyword) return math.floor(#keyword / 8) end,
3535 sorts = {
3636+ -- kind priority:
3737+ -- 1. keyword
3838+ -- 2. variable
3939+ -- 3. methods
4040+ -- 4. function
3641 function(a, b)
3737- local kind = require('blink.cmp.types').CompletionItemKind.Keyword
3838- if a.kind == kind and b.kind ~= kind then
3939- return true
4040- elseif a.kind ~= kind and b.kind == kind then
4141- return false
4242+ local index = function(t, v)
4343+ for index, value in ipairs(t) do
4444+ if value == v then return index end
4545+ end
4646+ return 100 -- using 100 because it is unlikely that I have more than 100 priorities
4747+ end
4848+ local kind = require('blink.cmp.types').CompletionItemKind
4949+ local priority = { kind.Keyword, kind.Variable, kind.Method, kind.Function }
5050+ local aIn = index(priority, a)
5151+ local bIn = index(priority, b)
5252+ if aIn ~= bIn then
5353+ return aIn > bIn
4254 end
4355 end,
4456 'score',