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

[RFC] XDG base directory specification support #3470

Merged
merged 43 commits into from Oct 26, 2015

Conversation

Projects
None yet
@ZyX-I
Contributor

ZyX-I commented Oct 17, 2015

This is the replacement for #3198, that fully implements #78, including documentation update, as requested in #3198 (comment).

I have not touched pi_.txt, os_.txt, vi_diff.txt, todo.txt, various.txt files.

Note: since it was not discussed, I assumed that ~/.gvimrc is replaced with $XDG_CONFIG_HOME/nvim/ginit.vim. Unless it is going away though.

@ZyX-I ZyX-I added the defaults label Oct 17, 2015

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

Most of documentation changes is replacing .vimrc (with dot) with vimrc (without dot).

Contributor

ZyX-I commented Oct 17, 2015

Most of documentation changes is replacing .vimrc (with dot) with vimrc (without dot).

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

Also many removes regarding windows (as I have no idea what should be written there).

Contributor

ZyX-I commented Oct 17, 2015

Also many removes regarding windows (as I have no idea what should be written there).

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

3795136 hanged on unknown test. If 3796471 also hangs I am considering #3427 a blocker (instead of using temporary commit that sets gtest output).

BTW, I do not think ZyX-I@dcc02b2 should be a part of this PR, but I do not know whether this should be part of a separate PR, or of something existing windows-related.

Contributor

ZyX-I commented Oct 17, 2015

3795136 hanged on unknown test. If 3796471 also hangs I am considering #3427 a blocker (instead of using temporary commit that sets gtest output).

BTW, I do not think ZyX-I@dcc02b2 should be a part of this PR, but I do not know whether this should be part of a separate PR, or of something existing windows-related.

@justinmk

This comment has been minimized.

Show comment
Hide comment
@justinmk

justinmk Oct 17, 2015

Member

ZyX-I@dcc02b2 is ok for this PR.

Member

justinmk commented Oct 17, 2015

ZyX-I@dcc02b2 is ok for this PR.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

This one also hangs. Hang does not happen locally, thus I am waiting for resolution with #3427.

Contributor

ZyX-I commented Oct 17, 2015

This one also hangs. Hang does not happen locally, thus I am waiting for resolution with #3427.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

By the way, not that this PR originally has &backupdir value different from #78: specifically ., prefix is absent (no backups inside current directory).

Contributor

ZyX-I commented Oct 17, 2015

By the way, not that this PR originally has &backupdir value different from #78: specifically ., prefix is absent (no backups inside current directory).

Show outdated Hide outdated src/nvim/os/stdpaths.c
#ifdef WIN32
// Windows
#elif APPLE
// Apple (this includes iOS, which we might need to handle differently)

This comment has been minimized.

@fmoralesc

fmoralesc Oct 17, 2015

Contributor

I think we decided to use the same XDG paths as in other *nixes for OSX (see #3198 (comment) and following)

@fmoralesc

fmoralesc Oct 17, 2015

Contributor

I think we decided to use the same XDG paths as in other *nixes for OSX (see #3198 (comment) and following)

This comment has been minimized.

@justinmk

justinmk Oct 17, 2015

Member

Yes 👍 Treat OSX as unix. Haters gonna hate.

@justinmk

justinmk Oct 17, 2015

Member

Yes 👍 Treat OSX as unix. Haters gonna hate.

@justinmk

This comment has been minimized.

Show comment
Hide comment
@justinmk

justinmk Oct 17, 2015

Member

&backupdir value different from #78: specifically ., prefix is absent (no backups inside current directory).

👍 One of the major advantages of adopting XDG is that we have standard directories to persist swap/undo/backup. We should default to using those and consider enabling swap & persistent undo by default.

Member

justinmk commented Oct 17, 2015

&backupdir value different from #78: specifically ., prefix is absent (no backups inside current directory).

👍 One of the major advantages of adopting XDG is that we have standard directories to persist swap/undo/backup. We should default to using those and consider enabling swap & persistent undo by default.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

Also it would be good to merge #1909 before this: to place socket in $XDG_RUNTIME_DIR I in any case need a single entry point.

Contributor

ZyX-I commented Oct 17, 2015

Also it would be good to merge #1909 before this: to place socket in $XDG_RUNTIME_DIR I in any case need a single entry point.

Show outdated Hide outdated src/nvim/version.c
version_msg(_(" 3rd user vimrc file: \""));
version_msg(USR_VIMRC_FILE3);
version_msg("\"\n");
#endif // ifdef USR_VIMRC_FILE3
#ifdef USR_EXRC_FILE

This comment has been minimized.

@justinmk

justinmk Oct 17, 2015

Member

I do not think it makes sense to support USR_EXRC_FILE or USR_EXRC_FILE2 if we are removing vimrc already.

@justinmk

justinmk Oct 17, 2015

Member

I do not think it makes sense to support USR_EXRC_FILE or USR_EXRC_FILE2 if we are removing vimrc already.

Show outdated Hide outdated src/nvim/shada.c
}
} else {
#endif
file = SHADA_FILE;
file = shada_get_default_file();
#ifdef SHADA_FILE2

This comment has been minimized.

@justinmk

justinmk Oct 17, 2015

Member

When would SHADA_FILE2 be defined? Why is it optional?

@justinmk

justinmk Oct 17, 2015

Member

When would SHADA_FILE2 be defined? Why is it optional?

This comment has been minimized.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

I have no idea. Inherited from viminfo. Maybe for windows ./_ support, in which case it is not needed (no leading dots in file name anymore).

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

I have no idea. Inherited from viminfo. Maybe for windows ./_ support, in which case it is not needed (no leading dots in file name anymore).

This comment has been minimized.

@justinmk

justinmk Oct 17, 2015

Member

Even if so the _ prefix is not need in modern Windows.

@justinmk

justinmk Oct 17, 2015

Member

Even if so the _ prefix is not need in modern Windows.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

I have a reason to want ., default there: until we have support for // like &directory there will be overlaps.

Contributor

ZyX-I commented Oct 17, 2015

I have a reason to want ., default there: until we have support for // like &directory there will be overlaps.

Show outdated Hide outdated src/nvim/os/stdpaths.c
static const char *const xdg_defaults[] = {
// Windows, Apple stuff are just shims right now
#ifdef WIN32
// Windows

This comment has been minimized.

@fmoralesc

fmoralesc Oct 17, 2015

Contributor

If we leave this empty for now, what would it mean for people who are building/using nvim in Windows already?

@fmoralesc

fmoralesc Oct 17, 2015

Contributor

If we leave this empty for now, what would it mean for people who are building/using nvim in Windows already?

This comment has been minimized.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

17.10.2015, 21:41, "Felipe Morales" notifications@github.com:

In src/nvim/os/stdpaths.c:

+static const char *xdg_env_vars[] = { > + [kXDGConfigHome] = "XDG_CONFIG_HOME", > + [kXDGDataHome] = "XDG_DATA_HOME", > + [kXDGCacheHome] = "XDG_CACHE_HOME", > + [kXDGRuntimeDir] = "XDG_RUNTIME_DIR", > + [kXDGConfigDirs] = "XDG_CONFIG_DIRS", > + [kXDGDataDirs] = "XDG_DATA_DIRS", > +}; > + > +/// Defaults for XDGVarType values > +/// > +/// Used in case environment variables contain nothing. Need to be expanded. > +static const char *const xdg_defaults[] = { > + // Windows, Apple stuff are just shims right now > +#ifdef WIN32 > + // Windows

If we leave this empty for now, what would it mean for people who are building/using nvim in Windows already?

That this will fail with syntax error. #endif is wrongly placed.

If it is correctly placed it should SEGV.


Reply to this email directly or view it on GitHub.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

17.10.2015, 21:41, "Felipe Morales" notifications@github.com:

In src/nvim/os/stdpaths.c:

+static const char *xdg_env_vars[] = { > + [kXDGConfigHome] = "XDG_CONFIG_HOME", > + [kXDGDataHome] = "XDG_DATA_HOME", > + [kXDGCacheHome] = "XDG_CACHE_HOME", > + [kXDGRuntimeDir] = "XDG_RUNTIME_DIR", > + [kXDGConfigDirs] = "XDG_CONFIG_DIRS", > + [kXDGDataDirs] = "XDG_DATA_DIRS", > +}; > + > +/// Defaults for XDGVarType values > +/// > +/// Used in case environment variables contain nothing. Need to be expanded. > +static const char *const xdg_defaults[] = { > + // Windows, Apple stuff are just shims right now > +#ifdef WIN32 > + // Windows

If we leave this empty for now, what would it mean for people who are building/using nvim in Windows already?

That this will fail with syntax error. #endif is wrongly placed.

If it is correctly placed it should SEGV.


Reply to this email directly or view it on GitHub.

This comment has been minimized.

@justinmk

justinmk Oct 17, 2015

Member

We can stub it out with the examples from https://github.com/ActiveState/appdirs/blob/master/appdirs.py .

@justinmk

This comment has been minimized.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

@justinmk Even assuming that C:\\Users\\user\\ from examples is ~\\ (I can’t reliably use $USER even on *nix) I have no idea what is AppAuthor. Also what exactly is AppName: nvim/Neovim/neovim?

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

@justinmk Even assuming that C:\\Users\\user\\ from examples is ~\\ (I can’t reliably use $USER even on *nix) I have no idea what is AppAuthor. Also what exactly is AppName: nvim/Neovim/neovim?

This comment has been minimized.

@fmoralesc

fmoralesc Oct 17, 2015

Contributor

@ZyX-I AppAuthor in this case should be Neovim, and the same for AppName. Supposedly, you could use the %AppData% environment variable, see http://blogs.msdn.com/b/patricka/archive/2010/03/18/where-should-i-store-my-data-and-configuration-files-if-i-target-multiple-os-versions.aspx

@fmoralesc

fmoralesc Oct 17, 2015

Contributor

@ZyX-I AppAuthor in this case should be Neovim, and the same for AppName. Supposedly, you could use the %AppData% environment variable, see http://blogs.msdn.com/b/patricka/archive/2010/03/18/where-should-i-store-my-data-and-configuration-files-if-i-target-multiple-os-versions.aspx

This comment has been minimized.

@justinmk

@ghost ghost referenced this pull request Oct 17, 2015

Closed

[WIP] XDG support #3198

@ZyX-I ZyX-I changed the title from [RFC] XDG base directory specification support to [WIP] XDG base directory specification support Oct 17, 2015

@@ -994,7 +994,7 @@ expect.
Environment variables can be used in a pattern: >
:autocmd BufRead $VIMRUNTIME/doc/*.txt set expandtab
And ~ can be used for the home directory (if $HOME is defined): >
:autocmd BufWritePost ~/.vimrc so ~/.vimrc
:autocmd BufWritePost ~/.config/nvim/init.vim so <afile>

This comment has been minimized.

@ghost

ghost Oct 17, 2015

Regarding all these references to ~/.config/...: shouldn't these instead say $XDG_CONFIG_HOME/...?

@ghost

ghost Oct 17, 2015

Regarding all these references to ~/.config/...: shouldn't these instead say $XDG_CONFIG_HOME/...?

This comment has been minimized.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

17.10.2015, 22:01, "Michael Reed" notifications@github.com:

In runtime/doc/autocmd.txt:

@@ -994,7 +994,7 @@ expect. > Environment variables can be used in a pattern: > > :autocmd BufRead $VIMRUNTIME/doc/*.txt set expandtab > And ~ can be used for the home directory (if $HOME is defined): > > - :autocmd BufWritePost ~/.vimrc so ~/.vimrc > + :autocmd BufWritePost ~/.config/nvim/init.vim so

Regarding all these references to ~/.config/...: shouldn't these instead say $XDG_CONFIG_HOME/...?

Not all of them: $XDG_CONFIG_HOME is not guaranteed to be defined since PR with approach which adds support for XDG_* vars to vim_getenv was rejected.

Most of other stay as-is because I am not fond of explaining WTF is $XDG_CONFIG_HOME and what is its default. I guess we need another section somewhere in documentation (options.txt?) with explanations.


Reply to this email directly or view it on GitHub.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

17.10.2015, 22:01, "Michael Reed" notifications@github.com:

In runtime/doc/autocmd.txt:

@@ -994,7 +994,7 @@ expect. > Environment variables can be used in a pattern: > > :autocmd BufRead $VIMRUNTIME/doc/*.txt set expandtab > And ~ can be used for the home directory (if $HOME is defined): > > - :autocmd BufWritePost ~/.vimrc so ~/.vimrc > + :autocmd BufWritePost ~/.config/nvim/init.vim so

Regarding all these references to ~/.config/...: shouldn't these instead say $XDG_CONFIG_HOME/...?

Not all of them: $XDG_CONFIG_HOME is not guaranteed to be defined since PR with approach which adds support for XDG_* vars to vim_getenv was rejected.

Most of other stay as-is because I am not fond of explaining WTF is $XDG_CONFIG_HOME and what is its default. I guess we need another section somewhere in documentation (options.txt?) with explanations.


Reply to this email directly or view it on GitHub.

This comment has been minimized.

@ghost

ghost Oct 17, 2015

I guess we need another section somewhere in documentation (options.txt?) with explanations.

I think that would be a good idea. It's not too complicated, so I think it should be doable in a paragraph or two, at least as a high level overview.

@ghost

ghost Oct 17, 2015

I guess we need another section somewhere in documentation (options.txt?) with explanations.

I think that would be a good idea. It's not too complicated, so I think it should be doable in a paragraph or two, at least as a high level overview.

This comment has been minimized.

@justinmk

justinmk Oct 17, 2015

Member

I don't think it's necessary to be so specific. It is understood that ~/.config means "what ~/.vim used to mean". And for new users, also, it is easier to understand ~/.config than an env var from the linux desktop standard.

@justinmk

justinmk Oct 17, 2015

Member

I don't think it's necessary to be so specific. It is understood that ~/.config means "what ~/.vim used to mean". And for new users, also, it is easier to understand ~/.config than an env var from the linux desktop standard.

This comment has been minimized.

@ghost

ghost Oct 17, 2015

Eh, probably. Let's not complicate it further.

@ghost

ghost Oct 17, 2015

Eh, probably. Let's not complicate it further.

Show outdated Hide outdated runtime/doc/starting.txt
Unix $HOME/.vimrc or $HOME/.vim/vimrc
MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc
or $VIM/_vimrc
Unix $XDG_CONFIG_HOME/.config/nvim/init.vim

This comment has been minimized.

@ghost

ghost Oct 17, 2015

shouldn't this be Unix $XDG_CONFIG_HOME/nvim/init.vim

@ghost

ghost Oct 17, 2015

shouldn't this be Unix $XDG_CONFIG_HOME/nvim/init.vim

$HOME/.vim/ directory ($HOME/vimfiles/ for MS-Windows). That makes it
easy to copy it to another system.
RECOMMENDATION: Put all your Vim configuration stuff in the
$HOME/.config/nvim/ directory. That makes it easy to copy it to

This comment has been minimized.

@ghost

ghost Oct 17, 2015

$XDG_CONFIG_HOME was just introduced above, so I think it should be used here instead of $HOME/.config.

@ghost

ghost Oct 17, 2015

$XDG_CONFIG_HOME was just introduced above, so I think it should be used here instead of $HOME/.config.

Show outdated Hide outdated runtime/doc/filetype.txt
@@ -224,7 +224,7 @@ D. If your filetype can only be detected by inspecting the contents of the
1. Create your user runtime directory. You would normally use the first
item of the 'runtimepath' option. Example for Unix: >
:!mkdir ~/.vim
:!mkdir ~/.config/nvim

This comment has been minimized.

@ghost

ghost Oct 17, 2015

mkdir -p?

@ghost
Show outdated Hide outdated runtime/doc/filetype.txt
@@ -196,7 +196,7 @@ B. If you want to detect your file after the default file type checks.
C. If your file type can be detected by the file name.
1. Create your user runtime directory. You would normally use the first
item of the 'runtimepath' option. Example for Unix: >
:!mkdir ~/.vim
:!mkdir ~/.config/nvim

This comment has been minimized.

@ghost

ghost Oct 17, 2015

mkdir -p?

@ghost
Show outdated Hide outdated runtime/doc/filetype.txt
:!mkdir ~/.vim
:!mkdir ~/.vim/ftdetect
:!mkdir ~/.config/nvim
:!mkdir ~/.config/nvim/ftdetect

This comment has been minimized.

@ghost

ghost Oct 17, 2015

mkdir -p?

@ghost
@justinmk

This comment has been minimized.

Show comment
Hide comment
@justinmk

justinmk Oct 17, 2015

Member

XDG defaults for Windows (reference):

+  [kXDGConfigHome] = "~\\$CSIDL_LOCAL_APPDATA\\nvim",
+  [kXDGDataHome]   = "~\\$CSIDL_LOCAL_APPDATA\\nvim",  //same as kXDGConfigHome
+  [kXDGCacheHome]  = "~\\$CSIDL_LOCAL_APPDATA\\nvim\\cache",
+  [kXDGRuntimeDir] = "",  //I don't know what this is for
+  [kXDGConfigDirs] = "$CSIDL_COMMON_APPDATA\\nvim\\nvim",
+  [kXDGDataDirs] = "$CSIDL_COMMON_APPDATA\\nvim\\nvim",  //same as kXDGConfigDirs

Note that this does not switch on "roaming" but that is out of scope for now. This should be good enough.

Member

justinmk commented Oct 17, 2015

XDG defaults for Windows (reference):

+  [kXDGConfigHome] = "~\\$CSIDL_LOCAL_APPDATA\\nvim",
+  [kXDGDataHome]   = "~\\$CSIDL_LOCAL_APPDATA\\nvim",  //same as kXDGConfigHome
+  [kXDGCacheHome]  = "~\\$CSIDL_LOCAL_APPDATA\\nvim\\cache",
+  [kXDGRuntimeDir] = "",  //I don't know what this is for
+  [kXDGConfigDirs] = "$CSIDL_COMMON_APPDATA\\nvim\\nvim",
+  [kXDGDataDirs] = "$CSIDL_COMMON_APPDATA\\nvim\\nvim",  //same as kXDGConfigDirs

Note that this does not switch on "roaming" but that is out of scope for now. This should be good enough.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

@justinmk Try echo %CSIDL_LOCAL_APPDATA% in wineconsole cmd.exe. It will echo %CSIDL_LOCAL_APPDATA%. For %PATH% it works fine.

Contributor

ZyX-I commented Oct 17, 2015

@justinmk Try echo %CSIDL_LOCAL_APPDATA% in wineconsole cmd.exe. It will echo %CSIDL_LOCAL_APPDATA%. For %PATH% it works fine.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

That means that there is no such environment variable we can rely upon.

Contributor

ZyX-I commented Oct 17, 2015

That means that there is no such environment variable we can rely upon.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

cmd.exe in Windows 8.1 in VirtualBox makes no difference.

Contributor

ZyX-I commented Oct 17, 2015

cmd.exe in Windows 8.1 in VirtualBox makes no difference.

@fmoralesc

This comment has been minimized.

Show comment
Hide comment
@fmoralesc

fmoralesc Oct 17, 2015

Contributor

@ZyX-I What do %APPDATA% and %LOCALAPPDATA% expand to? You should be able to use those.

Contributor

fmoralesc commented Oct 17, 2015

@ZyX-I What do %APPDATA% and %LOCALAPPDATA% expand to? You should be able to use those.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

%APPDATA works (C:\users\zyx\Application Data in wine). Not sure what was supposed to be written after “and”.

Contributor

ZyX-I commented Oct 17, 2015

%APPDATA works (C:\users\zyx\Application Data in wine). Not sure what was supposed to be written after “and”.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 17, 2015

Given that a user vimrc could be in ~/.nvimrc or ~/.nvim/nvimrc by default, referring to it as .n?vimrc doesn't seem preferable regardless of the XDG spec being implemented or not.

Given that, I think most of the documentation touched in this PR can be extracted to a separate PR. I'll go ahead and do that if others agree.

ghost commented Oct 17, 2015

Given that a user vimrc could be in ~/.nvimrc or ~/.nvim/nvimrc by default, referring to it as .n?vimrc doesn't seem preferable regardless of the XDG spec being implemented or not.

Given that, I think most of the documentation touched in this PR can be extracted to a separate PR. I'll go ahead and do that if others agree.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

LOCALAPPDATA also works in wine (adds Local Settings after zyx).

Contributor

ZyX-I commented Oct 17, 2015

LOCALAPPDATA also works in wine (adds Local Settings after zyx).

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

And I got “@ZyX-I What do %APPDATA% and” for #3470 (comment) in email, thus “Not sure what was supposed to be written after “and”.”.

Contributor

ZyX-I commented Oct 17, 2015

And I got “@ZyX-I What do %APPDATA% and” for #3470 (comment) in email, thus “Not sure what was supposed to be written after “and”.”.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

@Pyrohh This would be a number of merge conflicts, especially given that some .vimrc occurences were replaced with init.vim and not vimrc.

Contributor

ZyX-I commented Oct 17, 2015

@Pyrohh This would be a number of merge conflicts, especially given that some .vimrc occurences were replaced with init.vim and not vimrc.

if (trailing_pathseps) {
const size_t len = strlen(ret);
ret = xrealloc(ret, len + trailing_pathseps + 1);
memset(ret + len, PATHSEP, trailing_pathseps);

This comment has been minimized.

@oni-link

oni-link Oct 17, 2015

Contributor

Compiler complains about PATHSEP being undeclared.

@oni-link

oni-link Oct 17, 2015

Contributor

Compiler complains about PATHSEP being undeclared.

const size_t len = strlen(ret);
ret = xrealloc(ret, len + trailing_pathseps + 1);
memset(ret + len, PATHSEP, trailing_pathseps);
ret[len + trailing_pathseps] = NUL;

This comment has been minimized.

@oni-link

oni-link Oct 17, 2015

Contributor

Compiler complains about NUL being undeclared.

@oni-link

oni-link Oct 17, 2015

Contributor

Compiler complains about NUL being undeclared.

@fmoralesc

This comment has been minimized.

Show comment
Hide comment
@fmoralesc

fmoralesc Oct 17, 2015

Contributor

@ZyX-I Sorry, I pressed the Enter key by accident. I was asking for the value of %LOCALAPPDATA% (%APPDATA% is roaming, %LOCALAPPDATA% isn't).

Contributor

fmoralesc commented Oct 17, 2015

@ZyX-I Sorry, I pressed the Enter key by accident. I was asking for the value of %LOCALAPPDATA% (%APPDATA% is roaming, %LOCALAPPDATA% isn't).

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 17, 2015

@ZyX-I

especially given that some .vimrc occurences were replaced with init.vim and not vimrc

Those were the ones I planned on not touching. The reason I suggested it is because many--if not most--of the doc changes seem generally applicable. This PR is huge as it is, so slimming it down would help reviewing.

edit: but I don't want to cause a bunch of merge conflicts for you, so I have no strong feelings on what to do.

ghost commented Oct 17, 2015

@ZyX-I

especially given that some .vimrc occurences were replaced with init.vim and not vimrc

Those were the ones I planned on not touching. The reason I suggested it is because many--if not most--of the doc changes seem generally applicable. This PR is huge as it is, so slimming it down would help reviewing.

edit: but I don't want to cause a bunch of merge conflicts for you, so I have no strong feelings on what to do.

@justinmk

This comment has been minimized.

Show comment
Hide comment
@justinmk

justinmk Oct 17, 2015

Member

LOCALAPPDATA also works in wine (adds Local Settings after zyx).

@ZyX-I You are right that %CSIDL_LOCAL_APPDATA% does not work in cmd.exe. For that we may need to use win32 API, e.g. SHGetFolderPath.

Just use LOCALAPPDATA env var for now. Do not use APPDATA, it resolves to ~/AppData/Roaming if current environment is roaming. LOCALAPPDATA is least-risk for now, until we add enhancement for roaming and non-roaming cases.

Member

justinmk commented Oct 17, 2015

LOCALAPPDATA also works in wine (adds Local Settings after zyx).

@ZyX-I You are right that %CSIDL_LOCAL_APPDATA% does not work in cmd.exe. For that we may need to use win32 API, e.g. SHGetFolderPath.

Just use LOCALAPPDATA env var for now. Do not use APPDATA, it resolves to ~/AppData/Roaming if current environment is roaming. LOCALAPPDATA is least-risk for now, until we add enhancement for roaming and non-roaming cases.

Show outdated Hide outdated src/nvim/os/stdpaths.c
const char *const env_val = os_getenv(env);
char *ret = NULL;
if (ret != NULL) {

This comment has been minimized.

@oni-link

oni-link Oct 17, 2015

Contributor

env_val instead of ret?

@oni-link

oni-link Oct 17, 2015

Contributor

env_val instead of ret?

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 17, 2015

Contributor

@justinmk I do not like the idea of XDG_CONFIG_HOME and XDG_DATA_HOME pointing to the same locations: this will turn this directory into a junk, which will not cause problems with double loading of the plugins solely because I decided to use site subdirectory for data dirs.

Contributor

ZyX-I commented Oct 17, 2015

@justinmk I do not like the idea of XDG_CONFIG_HOME and XDG_DATA_HOME pointing to the same locations: this will turn this directory into a junk, which will not cause problems with double loading of the plugins solely because I decided to use site subdirectory for data dirs.

char *stdpaths_user_conf_subpath(const char *fname)
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
{
return concat_fnames_realloc(get_xdg_home(kXDGConfigHome), fname, true);

This comment has been minimized.

@oni-link

oni-link Oct 17, 2015

Contributor

At the moment get_xdg_home() could return NULL (empty xdg_defaults array for Windows), but concat_fnames_realloc() needs a not NULL argument.

@oni-link

oni-link Oct 17, 2015

Contributor

At the moment get_xdg_home() could return NULL (empty xdg_defaults array for Windows), but concat_fnames_realloc() needs a not NULL argument.

This comment has been minimized.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

Empty xdg_defaults is a crash, not NULL.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

Empty xdg_defaults is a crash, not NULL.

This comment has been minimized.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

Because it expands to xdg_defaults[] = {} which has zero length. Or compilation error (clang thinks this is GNU empty initializer extension).

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

Because it expands to xdg_defaults[] = {} which has zero length. Or compilation error (clang thinks this is GNU empty initializer extension).

This comment has been minimized.

@oni-link

oni-link Oct 17, 2015

Contributor

Should the entries for Windows set to an empty string until we have something to put into them or is this intentional?

@oni-link

oni-link Oct 17, 2015

Contributor

Should the entries for Windows set to an empty string until we have something to put into them or is this intentional?

This comment has been minimized.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

@oni-link What to put there is currently being discussed (and added in the most recent commit). Just wait.

@ZyX-I

ZyX-I Oct 17, 2015

Contributor

@oni-link What to put there is currently being discussed (and added in the most recent commit). Just wait.

@ZyX-I ZyX-I changed the title from [WIP] XDG base directory specification support to [RFC] XDG base directory specification support Oct 23, 2015

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 24, 2015

Contributor

About an API for script writers: I would suggest to add (in another PR) function getxdgdirs(varname) which accepts strings like XDG_CONFIG_HOME and returns either a string (for *_HOME and *_DIR XDG variables) or a list (for *_DIRS), empty in case of undefined. For users there is documentation and tutorials (BTW I do not remember myself changing any tutorials).

Contributor

ZyX-I commented Oct 24, 2015

About an API for script writers: I would suggest to add (in another PR) function getxdgdirs(varname) which accepts strings like XDG_CONFIG_HOME and returns either a string (for *_HOME and *_DIR XDG variables) or a list (for *_DIRS), empty in case of undefined. For users there is documentation and tutorials (BTW I do not remember myself changing any tutorials).

ZyX-I added some commits Oct 23, 2015

os/unix_defs: Rename default system vimrc file to sysinit.vim
This way all standard Vim file paths have .vim extension. VIMRC_FILE constant 
used for &exrc option was not touched.

@marvim marvim added the RFC label Oct 24, 2015

justinmk added a commit that referenced this pull request Oct 26, 2015

Merge pull request #3470 from ZyX-I/pr-3198
XDG base directory specification support

@justinmk justinmk merged commit 1ca5646 into neovim:master Oct 26, 2015

4 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.04%) to 67.961%
Details
default Build pr-3470 finished with status SUCCESSFUL
Details

@justinmk justinmk removed the RFC label Oct 26, 2015

@justinmk

This comment has been minimized.

Show comment
Hide comment
@justinmk

justinmk Oct 26, 2015

Member

Thank you @ZyX-I .

Member

justinmk commented Oct 26, 2015

Thank you @ZyX-I .

@xu-cheng

This comment has been minimized.

Show comment
Hide comment
@xu-cheng

xu-cheng Oct 26, 2015

Contributor

Looks like this PR introduced an backward incompatibility. It doesn't respect ~/.nvimrc or ~/.nvim/nvimrc as configure file anymore. Is such breaking change intentional?

$ nvim -v
NVIM 0.0.0-alpha+201510252238 (compiled Oct 26 2015 11:25:35)
Commit: 1ca5646bb52ec5c23b28f45bb7bc5d25cffad9b0
Build type: RelWithDebInfo
Compilation: /home/comp/chengxu/usr/bin/gcc-5 -Os -w -pipe -march=core2 -Wconversion -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20151026-26575-xo616q/build/config -I/tmp/neovim20151026-26575-xo616q/src -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/home/comp/chengxu/usr/include -I/tmp/neovim20151026-26575-xo616q/build/src/nvim/auto -I/tmp/neovim20151026-26575-xo616q/build/include
Compiled by chengxu@csr40.comp.hkbu.edu.hk

Optional features included (+) or not (-): +acl   +iconv    +jemalloc
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/home/comp/chengxu/usr/Cellar/neovim/HEAD/share/nvim"

Compared with compiling revision before this PR:

$ nvim -v
NVIM 0.0.0-alpha+201510231011 (compiled Oct 26 2015 11:41:09)
Commit: de4cb766ca381c09fd3f938136c1932ebf008f63
Build type: RelWithDebInfo
Compilation: /home/comp/chengxu/usr/bin/gcc-5 -Os -w -pipe -march=core2 -Wconversion -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20151026-17981-bt0ppn/build/config -I/tmp/neovim20151026-17981-bt0ppn/src -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/home/comp/chengxu/usr/include -I/tmp/neovim20151026-17981-bt0ppn/build/src/nvim/auto -I/tmp/neovim20151026-17981-bt0ppn/build/include
Compiled by chengxu@csr40.comp.hkbu.edu.hk

Optional features included (+) or not (-): +acl   +iconv    +jemalloc
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/nvimrc"
     user vimrc file: "~/.nvimrc"
 2nd user vimrc file: "~/.nvim/nvimrc"
      user exrc file: "~/.exrc"
  fall-back for $VIM: "/home/comp/chengxu/usr/Cellar/neovim/HEAD/share/nvim"
Contributor

xu-cheng commented Oct 26, 2015

Looks like this PR introduced an backward incompatibility. It doesn't respect ~/.nvimrc or ~/.nvim/nvimrc as configure file anymore. Is such breaking change intentional?

$ nvim -v
NVIM 0.0.0-alpha+201510252238 (compiled Oct 26 2015 11:25:35)
Commit: 1ca5646bb52ec5c23b28f45bb7bc5d25cffad9b0
Build type: RelWithDebInfo
Compilation: /home/comp/chengxu/usr/bin/gcc-5 -Os -w -pipe -march=core2 -Wconversion -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20151026-26575-xo616q/build/config -I/tmp/neovim20151026-26575-xo616q/src -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/tmp/neovim20151026-26575-xo616q/deps-build/usr/include -I/home/comp/chengxu/usr/include -I/tmp/neovim20151026-26575-xo616q/build/src/nvim/auto -I/tmp/neovim20151026-26575-xo616q/build/include
Compiled by chengxu@csr40.comp.hkbu.edu.hk

Optional features included (+) or not (-): +acl   +iconv    +jemalloc
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/home/comp/chengxu/usr/Cellar/neovim/HEAD/share/nvim"

Compared with compiling revision before this PR:

$ nvim -v
NVIM 0.0.0-alpha+201510231011 (compiled Oct 26 2015 11:41:09)
Commit: de4cb766ca381c09fd3f938136c1932ebf008f63
Build type: RelWithDebInfo
Compilation: /home/comp/chengxu/usr/bin/gcc-5 -Os -w -pipe -march=core2 -Wconversion -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20151026-17981-bt0ppn/build/config -I/tmp/neovim20151026-17981-bt0ppn/src -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/tmp/neovim20151026-17981-bt0ppn/deps-build/usr/include -I/home/comp/chengxu/usr/include -I/tmp/neovim20151026-17981-bt0ppn/build/src/nvim/auto -I/tmp/neovim20151026-17981-bt0ppn/build/include
Compiled by chengxu@csr40.comp.hkbu.edu.hk

Optional features included (+) or not (-): +acl   +iconv    +jemalloc
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/nvimrc"
     user vimrc file: "~/.nvimrc"
 2nd user vimrc file: "~/.nvim/nvimrc"
      user exrc file: "~/.exrc"
  fall-back for $VIM: "/home/comp/chengxu/usr/Cellar/neovim/HEAD/share/nvim"
@justinmk

This comment has been minimized.

Show comment
Hide comment
@justinmk

justinmk Oct 26, 2015

Member

@xu-cheng It is intentional; back-compat make be broken in some cases before 1.0. Here the migration is minimal, see :help nvim-from-vim for steps.

Member

justinmk commented Oct 26, 2015

@xu-cheng It is intentional; back-compat make be broken in some cases before 1.0. Here the migration is minimal, see :help nvim-from-vim for steps.

@ZyX-I ZyX-I deleted the ZyX-I:pr-3198 branch Oct 26, 2015

@tarruda

This comment has been minimized.

Show comment
Hide comment
@tarruda

tarruda Oct 26, 2015

Member

Great, will update my nvim version with this branch. Thanks to all involved in this.

BTW could #3498 be caused by this?

Member

tarruda commented Oct 26, 2015

Great, will update my nvim version with this branch. Thanks to all involved in this.

BTW could #3498 be caused by this?

@wbinnssmith

This comment has been minimized.

Show comment
Hide comment
@wbinnssmith

wbinnssmith Oct 27, 2015

hey folks,

anyone know where the default location for the autoload directory (so basically the runtimepath) went? neovim's not picking it up (for example, plug.vim in $XDG_DATA_HOME or $XDG_CONFIG_HOME).

:help autoload, points to runtimepath, and :help runtimepath claims that these directories are evaluated, but I can't reproduce this.

wbinnssmith commented Oct 27, 2015

hey folks,

anyone know where the default location for the autoload directory (so basically the runtimepath) went? neovim's not picking it up (for example, plug.vim in $XDG_DATA_HOME or $XDG_CONFIG_HOME).

:help autoload, points to runtimepath, and :help runtimepath claims that these directories are evaluated, but I can't reproduce this.

@fmoralesc

This comment has been minimized.

Show comment
Hide comment
@fmoralesc

fmoralesc Oct 27, 2015

Contributor

@wbinnssmith In that case, you should place the autoload directory in ~/.config/nvim/ or whatever split(runtimepath, ',', 0)[0] is. It should be $XDG_CONFIG_DIR/nvim/.

Contributor

fmoralesc commented Oct 27, 2015

@wbinnssmith In that case, you should place the autoload directory in ~/.config/nvim/ or whatever split(runtimepath, ',', 0)[0] is. It should be $XDG_CONFIG_DIR/nvim/.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 27, 2015

Contributor

@wbinnssmith Location of autoload directory did not change at all. The only thing which did change is the default value of &runtimepath. You may create autoload subdirectory in any directory you will see in :set runtimepath? output.

Contributor

ZyX-I commented Oct 27, 2015

@wbinnssmith Location of autoload directory did not change at all. The only thing which did change is the default value of &runtimepath. You may create autoload subdirectory in any directory you will see in :set runtimepath? output.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 27, 2015

Contributor

@wbinnssmith If you are not using some plugin manager it is now expected that you put plug.vim (i.e. third-party autoload file) into $XDG_DATA_HOME/nvim/autoload. $XDG_DATA_HOME defaults to ~/.local/share.

Note: putting it into $XDG_CONFIG_HOME/nvim/autoload (which is ~/.config/nvim/autoload by default) will also work, but this is going against XDG spec: plug.vim is not a user configuration file.

Contributor

ZyX-I commented Oct 27, 2015

@wbinnssmith If you are not using some plugin manager it is now expected that you put plug.vim (i.e. third-party autoload file) into $XDG_DATA_HOME/nvim/autoload. $XDG_DATA_HOME defaults to ~/.local/share.

Note: putting it into $XDG_CONFIG_HOME/nvim/autoload (which is ~/.config/nvim/autoload by default) will also work, but this is going against XDG spec: plug.vim is not a user configuration file.

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 27, 2015

Contributor

@fmoralesc There is no $XDG_CONFIG_DIR: there are variables $XDG_CONFIG_HOME (one directory, default ~/.config) and $XDG_CONFIG_DIRS (colon-separated list, default /etc/xdg).

Contributor

ZyX-I commented Oct 27, 2015

@fmoralesc There is no $XDG_CONFIG_DIR: there are variables $XDG_CONFIG_HOME (one directory, default ~/.config) and $XDG_CONFIG_DIRS (colon-separated list, default /etc/xdg).

@wbinnssmith

This comment has been minimized.

Show comment
Hide comment
@wbinnssmith

wbinnssmith Oct 27, 2015

Location of autoload directory did not change at all. The only thing which did change is the default value of &runtimepath. You may create autoload subdirectory in any directory you will see in :set runtimepath? output.

This is exactly what I expected it would be. Thanks 😄

re: $XDG_CONFIG_DIR, that was my slipup here on the comments. Should be $XDG_CONFIG_HOME

@wbinnssmith If you are not using some plugin manager it is now expected that you put plug.vim (i.e. third-party autoload file) into $XDG_DATA_HOME/nvim/autoload. $XDG_DATA_HOME defaults to ~/.local/share.

I'm actually trying to use a plugin manager in this case, which would in this case be the only file in autoload, yes? I agree that $XDG_DATA_HOME is a better place for this over CONFIG, but unfortunately neither are panning out for me at the moment. I'll continue looking into it.

wbinnssmith commented Oct 27, 2015

Location of autoload directory did not change at all. The only thing which did change is the default value of &runtimepath. You may create autoload subdirectory in any directory you will see in :set runtimepath? output.

This is exactly what I expected it would be. Thanks 😄

re: $XDG_CONFIG_DIR, that was my slipup here on the comments. Should be $XDG_CONFIG_HOME

@wbinnssmith If you are not using some plugin manager it is now expected that you put plug.vim (i.e. third-party autoload file) into $XDG_DATA_HOME/nvim/autoload. $XDG_DATA_HOME defaults to ~/.local/share.

I'm actually trying to use a plugin manager in this case, which would in this case be the only file in autoload, yes? I agree that $XDG_DATA_HOME is a better place for this over CONFIG, but unfortunately neither are panning out for me at the moment. I'll continue looking into it.

@fmoralesc

This comment has been minimized.

Show comment
Hide comment
@fmoralesc

fmoralesc Oct 27, 2015

Contributor

@ZyX-I Sorry, you are right about XDG_CONFIG_DIR; dunno where I got that from.

It's worth noting that ~/.local/share/nvim/autoload won't work: the default &runtimepath would not use that but ~/.local/share/nvim/site/autoload. (Why is that, btw?)

Contributor

fmoralesc commented Oct 27, 2015

@ZyX-I Sorry, you are right about XDG_CONFIG_DIR; dunno where I got that from.

It's worth noting that ~/.local/share/nvim/autoload won't work: the default &runtimepath would not use that but ~/.local/share/nvim/site/autoload. (Why is that, btw?)

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 27, 2015

Contributor

@fmoralesc You are right, I forgot about site. About why: default for $XDG_DATA_DIRS is /usr/local/share/:/usr/share/. $VIMRUNTIME is normally /usr/share/nvim/runtime. So I used $xdg_data_dir/nvim/site to make structure similar to the current Vim variant: $xdg_data_dir/vim/vim74 ($VIMRUNTIME) + $xdg_data_dir/vim/vimfiles (third-party files). $XDG_DATA_HOME got site mainly because I have choosen to treat it identically to directories in $XDG_DATA_DIRS.

Additionally users that install Neovim in $HOME may use the same layout: VIMRUNTIME=$HOME/.local/share/nvim/runtime with plugins in $HOME/.local/share/nvim/site.

@wbinnssmith Note that I forgot about site subdirectory: ~/.local/share/nvim/site/autoload, not ~/.local/share/nvim/autoload. Though this should be seen in set rtp?.

Contributor

ZyX-I commented Oct 27, 2015

@fmoralesc You are right, I forgot about site. About why: default for $XDG_DATA_DIRS is /usr/local/share/:/usr/share/. $VIMRUNTIME is normally /usr/share/nvim/runtime. So I used $xdg_data_dir/nvim/site to make structure similar to the current Vim variant: $xdg_data_dir/vim/vim74 ($VIMRUNTIME) + $xdg_data_dir/vim/vimfiles (third-party files). $XDG_DATA_HOME got site mainly because I have choosen to treat it identically to directories in $XDG_DATA_DIRS.

Additionally users that install Neovim in $HOME may use the same layout: VIMRUNTIME=$HOME/.local/share/nvim/runtime with plugins in $HOME/.local/share/nvim/site.

@wbinnssmith Note that I forgot about site subdirectory: ~/.local/share/nvim/site/autoload, not ~/.local/share/nvim/autoload. Though this should be seen in set rtp?.

@wbinnssmith

This comment has been minimized.

Show comment
Hide comment
@wbinnssmith

wbinnssmith Oct 27, 2015

@ZyX-I yeah, I resolved my issue — it was unrelated to the autoload path and just coincided with moving my configuration to XDG 😄

I do think that ~/.local/share/nvim ($XDG_DATA_HOME) should be in the runtimepath though. Do you agree?

wbinnssmith commented Oct 27, 2015

@ZyX-I yeah, I resolved my issue — it was unrelated to the autoload path and just coincided with moving my configuration to XDG 😄

I do think that ~/.local/share/nvim ($XDG_DATA_HOME) should be in the runtimepath though. Do you agree?

@ZyX-I

This comment has been minimized.

Show comment
Hide comment
@ZyX-I

ZyX-I Oct 27, 2015

Contributor

@wbinnssmith No. I have said why site subdirectory is there and it is useful. ($XDG_DATA_HOME is ~/.local/share, without nvim.)

Contributor

ZyX-I commented Oct 27, 2015

@wbinnssmith No. I have said why site subdirectory is there and it is useful. ($XDG_DATA_HOME is ~/.local/share, without nvim.)

fwalch added a commit to fwalch/homebrew-neovim that referenced this pull request Oct 28, 2015

Formula: Mention ':h nvim-from-vim'.
Previous instructions are outdated as of neovim/neovim#3470.

elasticdog added a commit to elasticdog/dotfiles that referenced this pull request Nov 6, 2015

Move nvimrc to XDG-compliant configuration location
There was an upstream change in how the config file locations are
handled. So now I must symlink ~/.config/nvim/ -> ~/.dotfiles/nvim/

See: neovim/neovim#3470
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment