Skip to content

Commit

Permalink
feat(core): support NVIM_APPNAME (#5073)
Browse files Browse the repository at this point in the history
Closes #5070
  • Loading branch information
fannheyward authored Jul 4, 2024
1 parent bdf2fa4 commit 5663297
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 4 additions & 3 deletions autoload/coc/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,14 @@ function! coc#util#get_config_home()
return resolve($VIMCONFIG)
endif
if has('nvim')
let appname = empty($NVIM_APPNAME) ? 'nvim' : $NVIM_APPNAME
if exists('$XDG_CONFIG_HOME')
return resolve($XDG_CONFIG_HOME."/nvim")
return resolve($XDG_CONFIG_HOME."/".appname)
endif
if s:is_win
return resolve($HOME.'/AppData/Local/nvim')
return resolve($HOME.'/AppData/Local/'.appname)
endif
return resolve($HOME.'/.config/nvim')
return resolve($HOME.'/.config/'.appname)
else
if s:is_win
return resolve($HOME."/vimfiles")
Expand Down
2 changes: 1 addition & 1 deletion doc/coc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2965,7 +2965,7 @@ COMMANDS *coc-commands*

:CocConfig *:CocConfig*

Edit the user config file `.vim/coc-settings.json` in
Edit the user config file `coc-settings.json` in
|coc#util#get_config_home()|

:CocLocalConfig *:CocLocalConfig*
Expand Down
8 changes: 8 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 2024-07-04

- Added `NVIM_APPNAME` support

# 2024-06-27

- Added `inlayHint.position` configuration, with `inline` and `eol` options

# 2024-06-20

- Added `coc.preferences.extensionUpdateUIInTab` to open `CocUpdate` UI in tab
Expand Down

0 comments on commit 5663297

Please sign in to comment.