From aaa009b1bf6a97420b44506d17030442d0448f07 Mon Sep 17 00:00:00 2001 From: NTBBloodbath Date: Mon, 22 Mar 2021 02:35:45 -0400 Subject: [PATCH] all: squashed some bugs --- autoload/doom.vim | 6 +++--- autoload/doom/default.vim | 4 +++- autoload/doom/system.vim | 3 ++- config/keybindings.vim | 1 + install.sh | 16 +++++++++++++++- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/autoload/doom.vim b/autoload/doom.vim index a2212b4..3bdc142 100644 --- a/autoload/doom.vim +++ b/autoload/doom.vim @@ -160,12 +160,12 @@ function! doom#end() abort " Plugins, configs are loaded only if the plugin is enabled. if index(g:doom_disabled_plugins, 'vista') == -1 - call doom#system#grepconfig('config/plugins/', 'vista.vim', 1) + call doom#system#grepconfig('config/plugins', 'vista.vim', 1) endif if index(g:doom_disabled_plugins, 'neoformat') == -1 - call doom#system#grepconfig('config/plugins/', 'neoformat.vim', 1) + call doom#system#grepconfig('config/plugins', 'neoformat.vim', 1) endif - call doom#system#grepconfig('config/plugins/', 'leader-mapper.vim', 1) + call doom#system#grepconfig('config/plugins', 'leader-mapper.vim', 1) " Check updates call doom#logging#init() diff --git a/autoload/doom/default.vim b/autoload/doom/default.vim index 308f5b1..bf083e5 100644 --- a/autoload/doom/default.vim +++ b/autoload/doom/default.vim @@ -60,7 +60,7 @@ endfunction function doom#default#loadGlob() " Set a custom command to update Doom Nvim " can be called by using :DoomUpdate - command DoomUpdate !git -C g:doom_root pull + command DoomUpdate !git -C ~/.config/doom-nvim/ pull " Set SPC as the mapleader let mapleader = ' ' @@ -68,6 +68,8 @@ function doom#default#loadGlob() " Indent Lines let g:indent_blankline_enabled = g:doom_show_indent let g:indent_blankline_char_list = ['|', '¦', '┆', '┊'] + " Disable indent lines on dashboard and help + let g:indent_blankline_filetype_exclude = ['help', 'dashboard'] " If treesitter is not disabled, then ... if index(g:doom_disabled_plugins, 'treesitter') == -1 " When on, use treesitter to determine the current context. Then show diff --git a/autoload/doom/system.vim b/autoload/doom/system.vim index 81261a2..83b8191 100644 --- a/autoload/doom/system.vim +++ b/autoload/doom/system.vim @@ -34,8 +34,9 @@ endfunction function! doom#system#grepconfig(folder, filename, source) abort " Source file or returns the full path - let fullpath = g:doom_root . a:folder . g:doom_separator . a:filename + let fullpath = g:doom_root . g:doom_separator . a:folder . g:doom_separator . a:filename + echo fullpath if filereadable(fullpath) if a:source ==# 1 try diff --git a/config/keybindings.vim b/config/keybindings.vim index 7fe6950..7c35f7e 100644 --- a/config/keybindings.vim +++ b/config/keybindings.vim @@ -57,6 +57,7 @@ if index(g:doom_disabled_plugins, 'vista') == -1 endif if index(g:doom_disabled_plugins, 'tree') == -1 nnoremap :NvimTreeToggle +endif if index(g:doom_disabled_plugins, 'minimap') == -1 nnoremap :MinimapToggle endif diff --git a/install.sh b/install.sh index 3122e20..69fb18d 100755 --- a/install.sh +++ b/install.sh @@ -115,7 +115,7 @@ check_requirements() { log_success "Check requirements : nvim" else log_warn "Check requirements : nvim" - fi + fi # Check if lua is installed again if hash "lua" &> /dev/null; then @@ -123,6 +123,20 @@ check_requirements() { else log_warn "Check requirements : lua" fi + + # Check if nodejs and npm are installed again, + # we do not check only nodejs because some Linux distributions + # installs nodejs but not also npm + if hash "node" &> /dev/null; then + log_success "Check requirements : node" + else + log_warn "Check requirements : node (optional, required to use LSP)" + fi + if hash "npm" &> /dev/null; then + log_success "Check requirements : npm" + else + log_warn "Check requirements : npm (optional, required to use LSP)" + fi } # }}}