Skip to content
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

Refine ignore terminal. #11

Merged
merged 3 commits into from
Aug 18, 2024
Merged

Conversation

Waitzz
Copy link
Contributor

@Waitzz Waitzz commented Jul 31, 2024

There is a error highlight on terminal, reproduction steps :

  1. cd ~/.local/share/lazy/whitespace.nvim
  2. nvim
  3. :e lua/whitespace-nvim/init.lua (in nvim's cmdline) have a correct highlight
  4. :terminal (in nivm's cmdline) have a error highlight

terminal buffer will not set fietype so the "FileType" autocmd will not be excuted , I add a "TermOpen" autocmd to clean match if "ignore_terminal" is set to true, add clean function for user can clean match if they want. and I think we should need put any conditions in hightlignt function , they should be put in function who call them.

please confirm for me , best wishes.

@Waitzz
Copy link
Contributor Author

Waitzz commented Jul 31, 2024

my test nvim version infomations : nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

lua/whitespace-nvim/init.lua Outdated Show resolved Hide resolved
lua/whitespace-nvim/init.lua Outdated Show resolved Hide resolved
@johnfrankmorgan
Copy link
Owner

Thanks for the PR @Waitzz, I've left a few comments. Let me know what you think.

@Waitzz
Copy link
Contributor Author

Waitzz commented Aug 11, 2024

I have modified it according to your suggestion, please review it again, thank you ~

reproduction steps:
1. type :e to edit a lua file or other file not be ignored
2. type :terminal to open a terminal buffer
3. type :e to previous lua file or other file not be ignored
4. wrong highlight happened

Change-Id: Ib96951e47f16f75cd7a7a7a84f1a9125e6a20c1e
@johnfrankmorgan johnfrankmorgan merged commit f7d14be into johnfrankmorgan:master Aug 18, 2024
@johnfrankmorgan
Copy link
Owner

Thanks @Waitzz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants