hoofcushion

Results 19 issues of hoofcushion

### How are you using the lua-language-server? NeoVim ### Which OS are you using? Linux ### What is the issue affecting? Diagnostics/Syntax Checking, Other ### Expected Behaviour If the warnning...

**Is your feature request related to a problem? Please describe.** **我想用不同拼写运算的prism索引同一个table.bin文件,但这是不行的,table.bin似乎与prism绑定。** > ![image](https://github.com/rime/librime/assets/32760059/d69a76f4-f149-49f5-ae91-bf4be556874a) 这种写法无效↑ > ![image](https://github.com/rime/librime/assets/32760059/e998f73f-8d38-4fe4-be90-a4808d107569) ![image](https://github.com/rime/librime/assets/32760059/abd4a31c-f379-47f0-b0be-0cae258652fe) 目前能用的写法是,先复制一份词库和方案,再重新部署,构建出另一套table.bin > ![image](https://github.com/rime/librime/assets/32760059/05074746-0c6d-4990-9778-86a62bb0d7e2) 最后在副翻译器中以词库名调用 **Describe the solution you'd like** **我希望的解决方案是,对于使用了相同词库,不同拼写运算的方案,允许使用不同的prism索引同一份词库,会更加方便,也不用多次编译同一份词库。** > ![image](https://github.com/rime/librime/assets/32760059/b3d72c41-b003-4c6c-9509-9dbb0d2786c8) 类似这样...

enhancement

commit raw input 是会更新用户词的,上屏的是 “我de”,但却会记录 “我” 的用户词,建议修改 ![20230915050451](https://github.com/rime/librime/assets/32760059/eb1b5490-e592-4ccc-b9fd-0d25858f08a8) editor.cc 没有 commit_context_input 方法,于是我用 Lua 实现了一个,希望 editor.cc 也能实现 ```lua local keyMap={[65293]=true,[65421]=true} return function(key,env) if env.engine.context:has_menu() and keyMap[key.keycode] then env.engine:commit_text(env.engine.context.input) env.engine.context:clear() return 1...

enhancement

```lua return { init=function(env) env.engine.context.commit_notifier:connect( function(ctx) local lct=ctx:get_commit_text() if isPureChinese(lct) then record(lct) end end) end, func=function()end } ``` 这个 Lua 会在汉字上屏后调用 record 函数,记录上屏内容,因此不需要 func 部分,但目前的 Lua组件 中 func 的值必须是函数。

![image](https://user-images.githubusercontent.com/32760059/235359809-640fc1fa-8501-4b30-aa3c-69a25922f559.png)![image](https://user-images.githubusercontent.com/32760059/235359862-795e7d83-096f-4e36-959f-1c16e98d79dd.png) 我制作了一份简拼词库,使用的过程中发现低权重的简拼词库常常会被高权重的主词库的补全顶下去,于是我就尝试削减补全候选的数量,但是我没有找到判断script translator候选是否为补全的接口。 在table_translator中,来自补全的候选都会通过cand.comment标识,但是script_translator并不支持这种操作,所以我尝试了其他的办法,目前发现了一个可行方式: 双拼方案中补全候选的input的长度总是cand.text长度的2倍再+1,所以可以通过捕捉这种关联来判断是否为补全。 效果图: ![image](https://user-images.githubusercontent.com/32760059/235363754-5bcd9d1f-dd78-4aef-ac6f-b216b49c39a0.png)![image](https://user-images.githubusercontent.com/32760059/235363766-e8e390b0-a24b-474c-bc3a-7c41a26e9c22.png)![image](https://user-images.githubusercontent.com/32760059/235363780-660ed7b2-6e02-4e9b-8336-4dcd64a15e1d.png) ```lua ------------------------------------------------------------- --[[======运行逻辑======== 1定义计数器b,累积补全数量(即 输入码为"wo d"时出现的"我的、我对"的候选的数量) 2检查是否"输入码为奇数的同时候选处于补全状态"  1是则计数一次补全候选的数量(b+1),并将编码提示改为『补全』  2然后判断补全候选的数量是否超过3,超过3则不再允许补全通过滤镜 结束 =判断当前是不是处于补全状态  (候选的长度)==(输入码长度)/2+0.5时,被认为处于补全状态,仅适用于双拼 =判断输入码是不是奇数     (输入码长度)/2的余数为1时,被认为是奇数 ==================--]] function abbreving_filter(input,env) local b=0 for cand in input:iter()...

I encountered an issue with zoxide where I had to delete db.zo due to a database file corruption error: zoxide: unsupported version (got 0, supports 3). That will fix the...

### Did you check the docs? - [X] I have read all the lazy.nvim docs ### Is your feature request related to a problem? Please describe. When too many lazy...

enhancement

### Problem I have identified a performance issue in the Neovim Lua API, specifically with the `vim.validate` function. The function is used to validate the types and values of function...

performance
lua

在 visual 模式下执行各类 action 时, 发送的字符总是 linewise 的选区. 我写过一个可以简单地获取选区文本的脚本, [rangemark.txt](https://github.com/luozhiya/fittencode.nvim/files/15335262/rangemark.txt) ```lua --- 文件名需要先改成 rangemark.lua RangeMark=require("rangemark") --- 暂存先前的选区标记 (vmark 指代 '

### Did you check the docs? - [X] I have read all the lazy.nvim docs ### Is your feature request related to a problem? Please describe. lazy.nvim can not hold...

enhancement