-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Recognise new cabal config location #12463
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12463 +/- ##
==========================================
+ Coverage 82.06% 82.09% +0.02%
==========================================
Files 160 160
Lines 193588 193625 +37
Branches 43472 43475 +3
==========================================
+ Hits 158877 158951 +74
+ Misses 21853 21836 -17
+ Partials 12858 12838 -20
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
When $XDG_CONFIG_HOME is set then using $XDG_CONFIG_HOME/.cabal/config
makes sense. But why drop $HOME/.config/cabal/config then? I see no
problem in recognizing both as cabalconfig.
Please add a test entry for this. You may need something more than an
entry in the table, setting $XDG_CONFIG_HOME before the filetype.vim
file is read. Deleting g:did_load_filetypes should help with that.
While at it, we can expect other entries using $XDG_CONFIG_HOME. It's
already in use for Git files. Would be good to test multiple filetypes
there. If you don't want to do this now, please add a TODO comment
somewhere.
…--
From "know your smileys":
:-D Big smile
/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
I tried to set and |
|
Oh, I see |
|
@brammool I added a test which caught a mistake 🎉. |
|
I tried to set `XDG_CONFIG_HOME` in `Test_filetype_detection` with:
```
if !empty(windowsversion())
let $XDG_CONFIG_HOME=expand("$HOME/.config")
endif
```
and `vim` complains with:
```
Found errors in Test_filetype_detection():
Caught exception in Test_filetype_detection(): Vim(call):E1126: Cannot use :let in Vim9 script @ command line..script /home/coot/src/vim/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_filetype_detection, line 2
```
Right, you can just drop the "let":
$XDG_CONFIG_HOME = expand("$HOME/.config")
For checking if an environment variable exists using exists('$NAME')
is simpler and more explicit than has_key() and environ(). I'll make it
like that.
It's better not the create test files under $HOME, in case the test
aborts files may be left behind unnoticed. That requires a few more
changes, I'll do that. Please check with what I ended up with.
…--
An error has occurred. Hit any user to continue.
/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Problem: Not all cabal config files are recognized. Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463) vim/vim@166cd7b Co-authored-by: Marcin Szamotulski <[email protected]>
Problem: Not all cabal config files are recognized. Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463) vim/vim@166cd7b Co-authored-by: Marcin Szamotulski <[email protected]>
Problem: Not all cabal config files are recognized. Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463) vim/vim@166cd7b Co-authored-by: Marcin Szamotulski <[email protected]>
Problem: Not all cabal config files are recognized. Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463) vim/vim@166cd7b Also: - Do not expand Lua patterns in environment variables used in file patterns. - Test $XDG_CONFIG_HOME on Windows, as it can be used by Nvim (and the runner sets it). Co-authored-by: Marcin Szamotulski <[email protected]>
Problem: Not all cabal config files are recognized. Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463) vim/vim@166cd7b Also: - Do not expand Lua patterns in environment variables used in file patterns. - Test $XDG_CONFIG_HOME on Windows, as it can be used by Nvim (and the runner sets it). Co-authored-by: Marcin Szamotulski <[email protected]>
Problem: Not all cabal config files are recognized. Solution: Add a couple of patterns. (Marcin Szamotulski, closes vim/vim#12463) vim/vim@166cd7b Also: - Do not expand Lua patterns in environment variables used in file patterns. - Test $XDG_CONFIG_HOME on Windows, as it can be used by Nvim (and the runner sets it). Co-authored-by: Marcin Szamotulski <[email protected]>
No description provided.