-
-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selecting a spell suggestion now uses z{index}= #3022
Conversation
…nstead of ciw to fix spellrepall command
I don't think this works depending of the So we'd need to check the |
Oh so you mean |
Yeah but it's worse than that cuz it's not just a difference of capitalized "Again" versus "again". Maybe some of the first few words match but the order and the list of words could be completely different depending on the word. For example, if I have "hillo world" and I I don't have any great solutions for this. I think for But fyi
you don't need to maintain a fork of telescope for this or other similar minor changes. You can just copy/paste the code for the picker into your own config and tweak things to your hearts content. |
Hmm yeah it's a tricky thing. It could be documented that to the :spellr command working you need to |
By the way for the record this is what I added to my config (+ the vim cmd vim.api.nvim_create_user_command('CustomTelescopeSpellSuggest', function()
require('telescope.builtin').spell_suggest({
attach_mappings = function(prompt_bufnr)
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local utils = require("telescope.utils")
actions.select_default:replace(function()
local selection = action_state.get_selected_entry()
if selection == nil then
utils.__warn_no_selection("builtin.spell_suggest")
return
end
action_state.get_current_picker(prompt_bufnr)._original_mode = "i"
actions.close(prompt_bufnr)
vim.cmd("normal! " .. selection.index .. "z=")
vim.cmd("stopinsert")
end)
return true
end,
})
end, {}) |
Glad you got something working for yourself. |
Selecting a spell suggestion now uses z{index}= instead of ciw.
This fixes
spellrepall
command not workingz{index}= is the same than typing z= and then typing the index with the native spell plugin
Description
#3019
Please delete options that are not relevant.
How Has This Been Tested?
Open a file such as a.md with "Hey yelterdai yelterdai was good"
Telescope spell_suggest
on the first mistyped yesterday choose one element then type:spellrepall
and it will apply to the second element (and all others if applicable)Configuration:
NVIM v0.10.0-dev-2723+g981301d11
windows 11 WSL ubuntu 22
Checklist: