[RFC] Add option to disable the filepath completer#1061
[RFC] Add option to disable the filepath completer#1061zzbot merged 1 commit intoycm-core:masterfrom
Conversation
bstaletic
left a comment
There was a problem hiding this comment.
Reviewed 3 of 3 files at r1.
Reviewable status: 0 of 2 LGTMs obtained
ycmd/completers/general/filename_completer.py, line 86 at r1 (raw file):
filetypes = request_data[ 'filetypes' ] return ( '*' in disabled_filetypes or all( x in disabled_filetypes for x in filetypes ) )
This says that in order to disable filepath completer every current filetype needs to be blacklisted.
Wouldn't it be better to use any instead? Think about set filetype=c.doxygen and blacklisting that.
micbou
left a comment
There was a problem hiding this comment.
Reviewed 3 of 3 files at r1.
Reviewable status: 0 of 2 LGTMs obtained
ycmd/completers/general/filename_completer.py, line 86 at r1 (raw file):
Previously, bstaletic (Boris Staletic) wrote…
This says that in order to disable filepath completer every current filetype needs to be blacklisted.
Wouldn't it be better to use
anyinstead? Think aboutset filetype=c.doxygenand blacklisting that.
I think you are right. The scenario were a user wants to blacklist the filetype A without blacklisting A.B (or B.A) is unlikely. I'll change it and add a test.
bstaletic
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 LGTMs obtained
ycmd/completers/general/filename_completer.py, line 86 at r1 (raw file):
Previously, micbou wrote…
I think you are right. The scenario were a user wants to blacklist the filetype
Awithout blacklistingA.B(orB.A) is unlikely. I'll change it and add a test.
If someone complains that blacklistin A also balcklists A.B we can add the whitelist, I guess. I wouldn't invest any effort until we get a complaint.
Add an option to disable the filepath completer by filetype.
27b37e6 to
81035c1
Compare
Codecov Report
@@ Coverage Diff @@
## master #1061 +/- ##
==========================================
- Coverage 97.51% 96.75% -0.76%
==========================================
Files 90 90
Lines 6950 6623 -327
==========================================
- Hits 6777 6408 -369
- Misses 173 215 +42 |
micbou
left a comment
There was a problem hiding this comment.
Reviewed 3 of 3 files at r2.
Reviewable status: 0 of 2 LGTMs obtained
ycmd/completers/general/filename_completer.py, line 86 at r1 (raw file):
Previously, bstaletic (Boris Staletic) wrote…
If someone complains that blacklistin
Aalso balcklistsA.Bwe can add the whitelist, I guess. I wouldn't invest any effort until we get a complaint.
Changed all to any and updated the tests.
bstaletic
left a comment
There was a problem hiding this comment.
Reviewed 2 of 3 files at r2.
Reviewable status: 0 of 2 LGTMs obtained (and 1 stale)
Valloric
left a comment
There was a problem hiding this comment.
Thanks for the PR!
Reviewable status: 1 of 2 LGTMs obtained (and 1 stale)
puremourning
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 2 of 2 LGTMs obtained (and 1 stale)
|
@zzbot r+ |
|
📌 Commit 81035c1 has been approved by |
[RFC] Add option to disable the filepath completer This PR adds the option `filepath_blacklist` to allow users to disable the filepath completer from triggering on the `/` character (and `\` on Windows) for a list of filetypes. This option works like [the `filetype_blacklist` option](https://github.com/Valloric/YouCompleteMe#the-gycm_filetype_blacklist-option) where keys are the filetypes for which the completer should be disabled and the values are unimportant. The special key `*` can be used to blacklist all filetypes. Contrarily to the `filetype_*` options, there is no `filepath_whitelist` counterpart as I don't really see the use case but nothing prevents us from adding it later. The `html`, `jsx`, and `xml` filetypes are blacklisted by default as there are the ones mentioned in issues ycm-core/YouCompleteMe#708 and ycm-core/YouCompleteMe#3057. There are probably other filetypes that should be ignored by default but they can always be added later. The next step is to give a way to manually trigger filepath completion through a mapping so that even if the `filepath_blacklist` option is set for a filetype, it's still possible to trigger filepath completion. See issue ycm-core/YouCompleteMe#986. Closes ycm-core/YouCompleteMe#708. Closes ycm-core/YouCompleteMe#3057. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1061) <!-- Reviewable:end -->
[RFC] Add option to disable the filepath completer This PR adds the option `filepath_blacklist` to allow users to disable the filepath completer from triggering on the `/` character (and `\` on Windows) for a list of filetypes. This option works like [the `filetype_blacklist` option](https://github.com/Valloric/YouCompleteMe#the-gycm_filetype_blacklist-option) where keys are the filetypes for which the completer should be disabled and the values are unimportant. The special key `*` can be used to blacklist all filetypes. Contrarily to the `filetype_*` options, there is no `filepath_whitelist` counterpart as I don't really see the use case but nothing prevents us from adding it later. The `html`, `jsx`, and `xml` filetypes are blacklisted by default as there are the ones mentioned in issues ycm-core/YouCompleteMe#708 and ycm-core/YouCompleteMe#3057. There are probably other filetypes that should be ignored by default but they can always be added later. The next step is to give a way to manually trigger filepath completion through a mapping so that even if the `filepath_blacklist` option is set for a filetype, it's still possible to trigger filepath completion. See issue ycm-core/YouCompleteMe#986. Closes ycm-core/YouCompleteMe#708. Closes ycm-core/YouCompleteMe#3057. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1061) <!-- Reviewable:end -->
[RFC] Add option to disable the filepath completer This PR adds the option `filepath_blacklist` to allow users to disable the filepath completer from triggering on the `/` character (and `\` on Windows) for a list of filetypes. This option works like [the `filetype_blacklist` option](https://github.com/Valloric/YouCompleteMe#the-gycm_filetype_blacklist-option) where keys are the filetypes for which the completer should be disabled and the values are unimportant. The special key `*` can be used to blacklist all filetypes. Contrarily to the `filetype_*` options, there is no `filepath_whitelist` counterpart as I don't really see the use case but nothing prevents us from adding it later. The `html`, `jsx`, and `xml` filetypes are blacklisted by default as there are the ones mentioned in issues ycm-core/YouCompleteMe#708 and ycm-core/YouCompleteMe#3057. There are probably other filetypes that should be ignored by default but they can always be added later. The next step is to give a way to manually trigger filepath completion through a mapping so that even if the `filepath_blacklist` option is set for a filetype, it's still possible to trigger filepath completion. See issue ycm-core/YouCompleteMe#986. Closes ycm-core/YouCompleteMe#708. Closes ycm-core/YouCompleteMe#3057. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1061) <!-- Reviewable:end -->
[RFC] Add option to disable the filepath completer This PR adds the option `filepath_blacklist` to allow users to disable the filepath completer from triggering on the `/` character (and `\` on Windows) for a list of filetypes. This option works like [the `filetype_blacklist` option](https://github.com/Valloric/YouCompleteMe#the-gycm_filetype_blacklist-option) where keys are the filetypes for which the completer should be disabled and the values are unimportant. The special key `*` can be used to blacklist all filetypes. Contrarily to the `filetype_*` options, there is no `filepath_whitelist` counterpart as I don't really see the use case but nothing prevents us from adding it later. The `html`, `jsx`, and `xml` filetypes are blacklisted by default as there are the ones mentioned in issues ycm-core/YouCompleteMe#708 and ycm-core/YouCompleteMe#3057. There are probably other filetypes that should be ignored by default but they can always be added later. The next step is to give a way to manually trigger filepath completion through a mapping so that even if the `filepath_blacklist` option is set for a filetype, it's still possible to trigger filepath completion. See issue ycm-core/YouCompleteMe#986. Closes ycm-core/YouCompleteMe#708. Closes ycm-core/YouCompleteMe#3057. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1061) <!-- Reviewable:end -->
[RFC] Add option to disable the filepath completer This PR adds the option `filepath_blacklist` to allow users to disable the filepath completer from triggering on the `/` character (and `\` on Windows) for a list of filetypes. This option works like [the `filetype_blacklist` option](https://github.com/Valloric/YouCompleteMe#the-gycm_filetype_blacklist-option) where keys are the filetypes for which the completer should be disabled and the values are unimportant. The special key `*` can be used to blacklist all filetypes. Contrarily to the `filetype_*` options, there is no `filepath_whitelist` counterpart as I don't really see the use case but nothing prevents us from adding it later. The `html`, `jsx`, and `xml` filetypes are blacklisted by default as there are the ones mentioned in issues ycm-core/YouCompleteMe#708 and ycm-core/YouCompleteMe#3057. There are probably other filetypes that should be ignored by default but they can always be added later. The next step is to give a way to manually trigger filepath completion through a mapping so that even if the `filepath_blacklist` option is set for a filetype, it's still possible to trigger filepath completion. See issue ycm-core/YouCompleteMe#986. Closes ycm-core/YouCompleteMe#708. Closes ycm-core/YouCompleteMe#3057. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1061) <!-- Reviewable:end -->
[RFC] Add option to disable the filepath completer This PR adds the option `filepath_blacklist` to allow users to disable the filepath completer from triggering on the `/` character (and `\` on Windows) for a list of filetypes. This option works like [the `filetype_blacklist` option](https://github.com/Valloric/YouCompleteMe#the-gycm_filetype_blacklist-option) where keys are the filetypes for which the completer should be disabled and the values are unimportant. The special key `*` can be used to blacklist all filetypes. Contrarily to the `filetype_*` options, there is no `filepath_whitelist` counterpart as I don't really see the use case but nothing prevents us from adding it later. The `html`, `jsx`, and `xml` filetypes are blacklisted by default as there are the ones mentioned in issues ycm-core/YouCompleteMe#708 and ycm-core/YouCompleteMe#3057. There are probably other filetypes that should be ignored by default but they can always be added later. The next step is to give a way to manually trigger filepath completion through a mapping so that even if the `filepath_blacklist` option is set for a filetype, it's still possible to trigger filepath completion. See issue ycm-core/YouCompleteMe#986. Closes ycm-core/YouCompleteMe#708. Closes ycm-core/YouCompleteMe#3057. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1061) <!-- Reviewable:end -->
|
☀️ Test successful - status-appveyor, status-travis |
|
💥 Test timed out |
[READY] Update ycmd Include the following changes: - PR ycm-core/ycmd#1028: rewrite Python completer; - PR ycm-core/ycmd#1035: prioritize compilation database over global extra conf; - PR ycm-core/ycmd#1036: use TypeScript completer for JavaScript; - PR ycm-core/ycmd#1038: fix GetDoc command on symbols declared in system headers; - PR ycm-core/ycmd#1039: handle FlagsForFile returning nothing; - PR ycm-core/ycmd#1049: update Unicode Standard to 11.0.0; - PR ycm-core/ycmd#1051: inform user if maximum number of diagnostics is exceeded; - PR ycm-core/ycmd#1052: add the regex module to sys.path in ycmd exclusively; - PR ycm-core/ycmd#1056: include Jedi performance improvements; - PR ycm-core/ycmd#1057: migrate the Clang completer to Settings in extra conf; - PR ycm-core/ycmd#1058: use node only if tsserver is supposed to run through it; - PR ycm-core/ycmd#1061: add option to disable the filepath completer. Documentation will be updated in separate PRs for ycm-core/ycmd#1028, ycm-core/ycmd#1036, ycm-core/ycmd#1057, and ycm-core/ycmd#1061. Closes #3067. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3082) <!-- Reviewable:end -->
[READY] Add g:ycm_filepath_blacklist option to documentation See PR ycm-core/ycmd#1061. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3087) <!-- Reviewable:end -->
This PR adds the option
filepath_blacklistto allow users to disable the filepath completer from triggering on the/character (and\on Windows) for a list of filetypes. This option works like thefiletype_blacklistoption where keys are the filetypes for which the completer should be disabled and the values are unimportant. The special key*can be used to blacklist all filetypes.Contrarily to the
filetype_*options, there is nofilepath_whitelistcounterpart as I don't really see the use case but nothing prevents us from adding it later.The
html,jsx, andxmlfiletypes are blacklisted by default as there are the ones mentioned in issues ycm-core/YouCompleteMe#708 and ycm-core/YouCompleteMe#3057. There are probably other filetypes that should be ignored by default but they can always be added later.The next step is to give a way to manually trigger filepath completion through a mapping so that even if the
filepath_blacklistoption is set for a filetype, it's still possible to trigger filepath completion. See issue ycm-core/YouCompleteMe#986.Closes ycm-core/YouCompleteMe#708.
Closes ycm-core/YouCompleteMe#3057.
This change is