Added all new files

master
Jef Roosens 2021-02-01 09:41:32 +01:00
parent b8ca691fa7
commit 136afdf82d
11 changed files with 62 additions and 27 deletions

7
.gitignore vendored
View File

@ -1,4 +1,11 @@
# File manager history
.netrwhist .netrwhist
# Directory where my swap/undo files are stored
.vim/ .vim/
# Where plugins are installed; can be done locally
plugged/ plugged/
# Old file after updating plug.vim
plug.vim.old plug.vim.old

View File

@ -1078,8 +1078,9 @@ function! s:checkout(spec)
let sha = a:spec.commit let sha = a:spec.commit
let output = s:git_revision(a:spec.dir) let output = s:git_revision(a:spec.dir)
if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) if !empty(output) && !s:hash_match(sha, s:lines(output)[0])
let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : ''
let output = s:system( let output = s:system(
\ 'git -c credential.helper= fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) \ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir)
endif endif
return output return output
endfunction endfunction
@ -1531,7 +1532,7 @@ while 1 " Without TCO, Vim stack is bound to explode
let [error, _] = s:git_validate(spec, 0) let [error, _] = s:git_validate(spec, 0)
if empty(error) if empty(error)
if pull if pull
let cmd = ['git', 'fetch'] let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch']
if has_tag && !empty(globpath(spec.dir, '.git/shallow')) if has_tag && !empty(globpath(spec.dir, '.git/shallow'))
call extend(cmd, ['--depth', '99999999']) call extend(cmd, ['--depth', '99999999'])
endif endif
@ -1847,7 +1848,7 @@ class Plugin(object):
self.write(Action.UPDATE, self.name, ['Updating ...']) self.write(Action.UPDATE, self.name, ['Updating ...'])
callback = functools.partial(self.write, Action.UPDATE, self.name) callback = functools.partial(self.write, Action.UPDATE, self.name)
fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else ''
cmd = 'git -c credential.helper= fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS)
com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) com = Command(cmd, self.args['dir'], G_TIMEOUT, callback)
result = com.execute(G_RETRIES) result = com.execute(G_RETRIES)
self.write(Action.DONE, self.name, result[-1:]) self.write(Action.DONE, self.name, result[-1:])
@ -2155,7 +2156,7 @@ function! s:update_ruby()
if pull if pull
log.call name, 'Updating ...', :update log.call name, 'Updating ...', :update
fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : ''
bt.call "#{chdir} && git -c credential.helper= fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil
else else
[true, skip] [true, skip]
end end

View File

@ -1,25 +1,10 @@
{ {
"languageserver": { "languageserver": {
"ccls": { "haskell": {
"command": "ccls", "command": "haskell-language-server-wrapper",
"filetypes": [ "args": ["--lsp"],
"c", "rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"],
"cpp", "filetypes": ["haskell", "lhaskell"]
"objc",
"objcpp"
],
"rootPatterns": [
".ccls",
"compile_commands.json",
".vim/",
".git/",
".hg/"
],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
} }
} }
} }

View File

@ -0,0 +1,31 @@
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": [
"c",
"cpp",
"objc",
"objcpp"
],
"rootPatterns": [
".ccls",
"compile_commands.json",
".vim/",
".git/",
".hg/"
],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
},
"haskell": {
"command": "haskell-language-server-wrapper",
"args": ["--lsp"],
"rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"],
"filetypes": ["haskell", "lhaskell"]
}
}
}

2
ftplugin/c.vim 100644
View File

@ -0,0 +1,2 @@
setlocal colorcolumn=80
setlocal textwidth=79

2
ftplugin/cpp.vim 100644
View File

@ -0,0 +1,2 @@
setlocal colorcolumn=80
setlocal textwidth=79

2
ftplugin/lua.vim 100644
View File

@ -0,0 +1,2 @@
set textwidth=79
set colorcolumn=80

View File

@ -1,7 +1,7 @@
" Show a visual line at width 120 " Show a visual line at width 120
setlocal colorcolumn=120 setlocal colorcolumn=80
" This auto-wraps the lines after it's reached more than 119 characters. " This auto-wraps the lines after it's reached more than 119 characters.
setlocal textwidth=119 setlocal textwidth=79
" Spellcheck " Spellcheck
" Turn on spell check " Turn on spell check

View File

@ -4,7 +4,7 @@ call plug#begin('~/.config/nvim/plugged')
" Gutentags creates a ctags file asynchronously. This allows me to jump to " Gutentags creates a ctags file asynchronously. This allows me to jump to
" definitions easily. " definitions easily.
Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' } " Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' }
" File navigation " File navigation
Plug 'ctrlpvim/ctrlp.vim' Plug 'ctrlpvim/ctrlp.vim'
@ -58,4 +58,6 @@ Plug 'godlygeek/tabular'
" Some auto-complete for haskell " Some auto-complete for haskell
Plug 'neovimhaskell/haskell-vim' Plug 'neovimhaskell/haskell-vim'
Plug 'vmchale/ion-vim'
call plug#end() call plug#end()

View File

@ -55,3 +55,6 @@ set undodir=./.vim/undo//
" Increases speed of CoC and Gitgutter " Increases speed of CoC and Gitgutter
set updatetime=250 set updatetime=250
" Make Vim use pipes instead of temp files when running commands
" set noshelltemp

View File