8000 Figure out what is turning off `'spell'` in Markdown files · Issue #143 · wincent/wincent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Figure out what is turning off 'spell' in Markdown files #143

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

Closed
wincent opened this issue Oct 7, 2023 · 1 comment
Closed

Figure out what is turning off 'spell' in Markdown files #143

wincent opened this issue Oct 7, 2023 · 1 comment

Comments

@wincent
Copy link
Owner
wincent commented Oct 7, 2023

print debugging shows it is getting turned on as part of ftplugin operations, but by the time I run :set spell? it is set to nospell and :verbose set spell? tells me it was "Last set from lua". Not sure which Lua though.

Will start with:

vim --cmd 'set verbose=16' --cmd 'set verbosefile=/tmp/log' CHANGELOG.md

which produces a 136K-line logfile 🤣.

@wincent
Copy link
Owner Author
wincent commented Nov 14, 2023

If I drop the ownsyntax stuff, the problem goes away, so something buggy in there.

wincent added a commit that referenced this issue Nov 15, 2023
This is probably not a minimal fix, as I tried a few things along the
way before arriving at this point, while trying to fix:

- #143

but I think the end result is probably worth keeping in its full form.

The motivating problem was that I wasn't seeing `'spell'` being set on
Markdown files. As noted on that issue, commenti
8000
ng out the
problem-plagued `ownsyntax` stuff made the problem go away.

I observed that on opening vim with `nvim CHANGELOG.md`, for example,
we'd get focus events that would end up clearing the `'spell'` setting
because we hadn't captured the value before calling `:ownsyntax on`. So
I initially added an additional `capture()` call before the first
invocation of `:ownsyntax on`.

But then I saw that open opening a new file in the same buffer, say,
`fig/main.ts`, that it still had `'spell'` set. So I added per-filetype
capturing, along with a `FileType` autocmd in order to make sure we got
the initial values for any given filetype.

That wasn't enough however, because the settings was evidently getting
applied to the window instead of the buffer, so I went down the rabbit
whole of `:setlocal` versus `vim.opt_local`, and the corresponding
low-level APIs. In the end `vim.api.nvim_set_option_value` does what we
want.

This continues to be ridiculously fragile, but it is at least working,
for now...
@wincent wincent closed this as completed Nov 15, 2023
wincent added a commit that referenced this issue Jul 19, 2024
* aspects/nvim/files/.config/nvim/pack/bundle/opt/LuaSnip 78296bf...ce0a05a (20):
  > Format with stylua
  > fix bug introduced by 365bebd.
  > Format with stylua
  > Auto generate docs
  > fix(loaders): trim whitespace around comma and at start/end of "scope".
  > test: fix some more flakiness.
  > Auto generate docs
  > fix: support spaces in make's path
  > Auto generate docs
  > Fix typo in documentation example code
  > Auto generate docs
  > Auto generate docs
  > Declare ls variable
  > doc: fix typos (close #1187)
  > Auto generate docs
  > fix(util): Path.parent now works on windows (#1168) (#1180)
  > Format with stylua
  > Auto generate docs
  > fix: stay compatible with old nvim-versions.
  > ft_func: translate treesitter-language to filetypes (close #1174).

* aspects/nvim/files/.config/nvim/pack/bundle/opt/cmp-calc ce91d14...5947b41 (1):
  > Merge pull request #7 from JosefLitos/main

* aspects/nvim/files/.config/nvim/pack/bundle/opt/indent-blankline.nvim 171d4d5...65e20ab (5):
  > fix: use `strwidth` instead of `strdisplaywidth`
  > feat: support empty foldtext in nvim 0.10
  > fix: tab indent calc with mixed tabs and spaces
  > fix: remove chunk from lua scopes
  > fix: only use `vim.iter` if available to avoid accidental breaking change

* aspects/nvim/files/.config/nvim/pack/bundle/opt/nvim-cmp abacd4c...d818fd0 (5):
  > fix(view): check in get_selected_index (#1993)
  > feat(view): add api get_selected_index (#1986)
  > fix(feedkeys): resolve issue with some copilot completions (#1981)
  > enable ghost_text for multi-line completions (#1886)
  > use nvim_get_option_value instead of nvim{,_buf,_win}_get_option

* aspects/nvim/files/.config/nvim/pack/bundle/opt/nvim-lspconfig a284b14...e26da40 (65):
  > docs: update server_configurations.md skip-checks: true
  > feat: added htmlangular ft to emmet_language_server, tailwindcss, emmet_ls and angularls (#3240)
  > docs: update server_configurations.md skip-checks: true
  > feat!: remove `--preview` flag from Ruff server (#3241)
  > docs: update server_configurations.md skip-checks: true
  > feat(leanls): add support for lakefile.toml-only packages (#3238)
  > feat: add janet lsp config (#3235)
  > docs: update server_configurations.md skip-checks: true
  > fix(tailwindcss): add includeLanguages (#3231)
  > docs: update server_configurations.md skip-checks: true
  > feat(texlab): add change environments workspace command (#3227)
  > feat: do not process commands if it's func type (#3200)
  > docs: update server_configurations.md skip-checks: true
  > feat(texlab): add find environments workspace command (#3225)
  > docs: update server_configurations.md skip-checks: true
  > feat: add bazelrc-lsp config (#3224)
  > docs: update server_configurations.md skip-checks: true
  > docs(shopify_theme_ls): remove unnecessary code snippet (#3223)
  > docs: update server_configurations.md skip-checks: true
  > feat: add pug-lsp support (#3220)
  > docs: update server_configurations.md skip-checks: true
  > feat: add protols support (#3219)
  > docs: update server_configurations.md skip-checks: true
  > feat(texlab): add support for worksapce commands (#3218)
  > ci: bump nvim-neorocks/luarocks-tag-release from 6 to 7 (#3217)
  > docs: update server_configurations.md skip-checks: true
  > fix(hyprls): autostart with hyprlang filetype (#3215)
  > fix(fsautocomplete): lint fix (#3214)
  > docs: update server_configurations.md skip-checks: true
  > fix(koka): fix koka language server config (#3213)
  > docs: update server_configurations.md skip-checks: true
  > feat: added recommended default settings for fsautocomplete (#3208)
  > ci: bump nvim-neorocks/luarocks-tag-release from 5 to 6
  > fix(CONTRIBUTING): typos (#3204)
  > docs: update server_configurations.md skip-checks: true
  > feat: add django-template-lsp support (#3203)
  > docs: update server_configurations.md skip-checks: true
  > feat(bitbake): add language-server-bitbake support (#3199)
  > docs: update server_configurations.md skip-checks: true
  > fix(slint-lsp): set root dir to git ancestor (#3194)
  > docs: update server_configurations.md skip-checks: true
  > feat(biome): add `css` as filetype (#3196)
  > docs: update server_configurations.md skip-checks: true
  > fix(sourcekit-lsp): use git as last resort for sourcekit-lsp. (#3192)
  > docs: update server_configurations.md skip-checks: true
  > feat: add fish-lsp support (#3188)
  > docs: update server_configurations.md skip-checks: true
  > fix: avoid overriding global default capabilities (#3181)
  > docs: update server_configurations.md skip-checks: true
  > fix(eslint): useFlatConfig revert to experimental (#3184)
  > docs: update server_configurations.md skip-checks: true
  > fix(eslint): useFlatConfig is not experimental anymore (#3183)
  > docs: update server_configurations.md skip-checks: true
  > fix(tsserver): update root directory order (#3180)
  > docs: update server_configurations.md skip-checks: true
  > feat(msbuild): add msbuild language tools server (#3176)
  > docs: delete lspconfig-keybindings section (#3175)
  > fix(util): check neovim nightly 0.11 version (#3173)
  > docs: update server_configurations.md skip-checks: true
  > fix(scripts): use compatible tbl_flatten in docgen (#3171)
  > feat(luau-lsp): add single file support (#3168)
  > fix: remove parenthesis from `find_git_ancestor` call (#3166)
  > feat: add daily note commands for markdown-oxide (#3164)
  > docs: update ansiblels homepage url (#3163)
  > feat: add bacon-ls support (#3160)

* aspects/nvim/files/.config/nvim/pack/bundle/opt/nvim-tree.lua 2bc725a...f9ff00b (16):
  > chore(master): release nvim-tree 1.5.0 (#2810)
  > fix(#2813): macos: enable file renaming with changed capitalization (#2814)
  > feat(#2598): add api.tree.resize (#2811)
  > fix(#2819): experimental.actions.open_file.relative_path issue following change directory (#2820)
  > chore(deps): bump nvim-neorocks/luarocks-tag-release from 5 to 7 (#2808)
  > feat(#2127): add experimental.actions.open_file.relative_path to open files with a relative path rather than absolute (#2805)
  > chore(deps): bump amannn/action-semantic-pull-request from 5.5.2 to 5.5.3 (#2812)
  > feat(#2799): `filesystem_watchers.ignore_dirs` and `git.disable_for_dirs` may be functions (#2800)
  > chore(master): release nvim-tree 1.4.0 (#2785)
  > chore: release 1.4.0
  > chore(#2787): minimum nvim version 0.9, replace 0.10 deprecated, enable deprecated warnings (#2788)
  > chore(#2731): neovim luadoc 0.10 compliance (#2786)
  > ci: release tags vMAJOR.MINOR.PATCH (#2772)
  > revert(#2781): "refactor: replace deprecated use of vim.diagnostic.is_disabled()" (#2784)
  > ci: add lua-language-server 3.9.1 (#2782)
  > refactor: replace deprecated use of vim.diagnostic.is_disabled()  (#2781)

* aspects/nvim/files/.config/nvim/pack/bundle/opt/typescript-vim eb4d90d...8d169e1 (1):
  > Merge pull request #207 from slmjkdbtl/rm-status-keyword

* aspects/nvim/files/.config/nvim/pack/bundle/opt/vim-fugitive 19ca61c...0444df6 (12):
  > Use nvim vim.ui.open as a fallback
  > Use callback based workflow for status buffer
  > Format the full body instead of separating title
  > Clarify dq behavior
  > Rearrange :Git documentation
  > Use rev-parse to get abbrev length for status buffer
  > Fix :Git difftool without -y
  > Fix :Git difftool -y
  > Make push map available on P
  > Normalize path before quoting it
  > Filter out bold/underline typesetting in man output
  > Ignore missing ssh include files

* aspects/nvim/files/.config/nvim/pack/bundle/opt/vim-git 105fd55...55583e3 (1):
  > Support update-ref in gitrebase

* aspects/nvim/files/.config/nvim/pack/bundle/opt/vim-kitty f16222c...9cc594a (3):
  > Sync with v0.35.2
  > fix: do not set comments in ftdetect (#30)
  > Sync with v0.35.0 (#31)

* aspects/nvim/files/.config/nvim/pack/bundle/opt/vim-ledger 7b97c87...dbc683e (1):
  > Align currency with no decimal point correctly (#160)

* aspects/nvim/files/.config/nvim/pack/bundle/opt/vim-repeat 24afe92...6584602 (6):
  > One last fix attempt before I revert everything
  > Restore unfolding during undo
  > Avoid stacktrace on undo in 'nomodifiable' buffer
  > Drop FUNDING.yml in favor of account-level default
  > Account for Vim undo double-incrementing b:changedtick
  > Bump minimum Vim version to 8.0

* aspects/nvim/files/.config/nvim/pack/bundle/opt/vim-slime 1a29ed8...ca59df2 (1):
  > Merge pull request #435 from jpalardy/remove-paste-file-neovim

* aspects/nvim/files/.config/nvim/pack/bundle/opt/zen-mode.nvim 78557d9...a31cf71 (26):
  > chore(update): update repository (#145)
  > chore(build): auto-generate docs
  > chore(update): update repository (#144)
  > chore(update): update repository (#143)
  > chore(update): update repository (#142)
  > chore(build): auto-generate docs
  > chore(update): update repository (#141)
  > chore(build): auto-generate docs
  > chore(main): release 1.4.0 (#139)
  > ci: update
  > ci: update
  > ci: update
  > chore(update): update repository (#138)
  > fix: assign filetype to background buffer (#91)
  > feat(border): add border to main window (#80)
  > chore(build): auto-generate docs
  > feat(plugins): implement Neovide plugin (#131)
  > chore(update): update repository (#137)
  > chore(build): auto-generate docs
  > feat(plugins): add the ability to disable todo-comments.nvim in zen-mode (#114)
  > fix: fixed opts.window.backdrop. Fixes #115, Closes #119
  > chore(build): auto-generate docs
  > ci: update
  > ci: update
  > chore(build): auto-generate docs
  > ci: update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0