neovim: Remove PATH-specific VIML
This commit is contained in:
parent
3205d00f06
commit
ec05f799ea
2 changed files with 11 additions and 9 deletions
|
@ -1,7 +1,14 @@
|
||||||
;; Move certain PATH entries to the end of the variable, because XCode CLI is not installed
|
;; Move certain PATH entries to the end of the variable, because XCode CLI is not installed
|
||||||
;; (and I don't want to see the prompt)
|
;; (and I don't want to see the prompt)
|
||||||
(let [current-path vim.env.PATH
|
(let [current-path vim.env.PATH
|
||||||
move-paths ":/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
|
move-paths [:/usr/local/bin :/usr/bin :/usr/sbin :/bin :/sbin]]
|
||||||
new-path (-> current-path (string.gsub move-paths "") (.. move-paths))]
|
(var new-path [])
|
||||||
(set vim.env.PATH new-path))
|
(var append-path [])
|
||||||
|
;; Loop over PATH and prepare the value tables
|
||||||
|
(each [part (string.gmatch current-path "[^:]+")]
|
||||||
|
(if (vim.tbl_contains move-paths part) (table.insert append-path part)
|
||||||
|
(table.insert new-path part)))
|
||||||
|
(each [_ part (ipairs append-path)]
|
||||||
|
(table.insert new-path part))
|
||||||
|
(set vim.env.PATH (table.concat new-path ":")))
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,8 @@ in
|
||||||
withPython3 = false;
|
withPython3 = false;
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
" Move these paths to the end of $PATH to prevent triggering the XCode CLI popup
|
|
||||||
let xcode_paths = [':/usr/local/bin:', ':/usr/bin:', ':/usr/sbin:', ':/bin:', ':/sbin:']
|
|
||||||
for xcode_path in xcode_paths
|
|
||||||
let $PATH = substitute($PATH, xcode_path, ":", "") . substitute(xcode_path, ":$", "", "")
|
|
||||||
endfor
|
|
||||||
|
|
||||||
lua << EOF
|
lua << EOF
|
||||||
|
require('nifoc.nix')
|
||||||
require('impatient')
|
require('impatient')
|
||||||
require('configuration.init')
|
require('configuration.init')
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue