From 136afdf82d10a0f885e5a971dcfebfc2d8cfc88b Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Mon, 1 Feb 2021 09:41:32 +0100 Subject: [PATCH] Added all new files --- .gitignore | 7 +++++++ autoload/plug.vim | 9 +++++---- coc-settings.json | 25 +++++-------------------- coc-settings.json.back | 31 +++++++++++++++++++++++++++++++ ftplugin/c.vim | 2 ++ ftplugin/cpp.vim | 2 ++ ftplugin/lua.vim | 2 ++ ftplugin/markdown.vim | 4 ++-- init/plugins.vim | 4 +++- init/settings.vim | 3 +++ init/terminal.vim | 0 11 files changed, 62 insertions(+), 27 deletions(-) create mode 100644 coc-settings.json.back create mode 100644 ftplugin/c.vim create mode 100644 ftplugin/cpp.vim create mode 100644 ftplugin/lua.vim create mode 100644 init/terminal.vim diff --git a/.gitignore b/.gitignore index 911e292..fba9346 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,11 @@ +# File manager history .netrwhist + +# Directory where my swap/undo files are stored .vim/ + +# Where plugins are installed; can be done locally plugged/ + +# Old file after updating plug.vim plug.vim.old diff --git a/autoload/plug.vim b/autoload/plug.vim index 865ce3f..9c296ac 100644 --- a/autoload/plug.vim +++ b/autoload/plug.vim @@ -1078,8 +1078,9 @@ function! s:checkout(spec) let sha = a:spec.commit let output = s:git_revision(a:spec.dir) 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( - \ '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 return output endfunction @@ -1531,7 +1532,7 @@ while 1 " Without TCO, Vim stack is bound to explode let [error, _] = s:git_validate(spec, 0) if empty(error) 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')) call extend(cmd, ['--depth', '99999999']) endif @@ -1847,7 +1848,7 @@ class Plugin(object): self.write(Action.UPDATE, self.name, ['Updating ...']) 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 '' - 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) result = com.execute(G_RETRIES) self.write(Action.DONE, self.name, result[-1:]) @@ -2155,7 +2156,7 @@ function! s:update_ruby() if pull log.call name, 'Updating ...', :update 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 [true, skip] end diff --git a/coc-settings.json b/coc-settings.json index e708ab4..949f46a 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -1,25 +1,10 @@ { "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"] } } } diff --git a/coc-settings.json.back b/coc-settings.json.back new file mode 100644 index 0000000..dac4b98 --- /dev/null +++ b/coc-settings.json.back @@ -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"] + } + } +} diff --git a/ftplugin/c.vim b/ftplugin/c.vim new file mode 100644 index 0000000..e1b4628 --- /dev/null +++ b/ftplugin/c.vim @@ -0,0 +1,2 @@ +setlocal colorcolumn=80 +setlocal textwidth=79 diff --git a/ftplugin/cpp.vim b/ftplugin/cpp.vim new file mode 100644 index 0000000..e1b4628 --- /dev/null +++ b/ftplugin/cpp.vim @@ -0,0 +1,2 @@ +setlocal colorcolumn=80 +setlocal textwidth=79 diff --git a/ftplugin/lua.vim b/ftplugin/lua.vim new file mode 100644 index 0000000..e615312 --- /dev/null +++ b/ftplugin/lua.vim @@ -0,0 +1,2 @@ +set textwidth=79 +set colorcolumn=80 diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 964fd44..cb1e5b3 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -1,7 +1,7 @@ " 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. -setlocal textwidth=119 +setlocal textwidth=79 " Spellcheck " Turn on spell check diff --git a/init/plugins.vim b/init/plugins.vim index 553ecea..9494460 100644 --- a/init/plugins.vim +++ b/init/plugins.vim @@ -4,7 +4,7 @@ call plug#begin('~/.config/nvim/plugged') " Gutentags creates a ctags file asynchronously. This allows me to jump to " definitions easily. -Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' } +" Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' } " File navigation Plug 'ctrlpvim/ctrlp.vim' @@ -58,4 +58,6 @@ Plug 'godlygeek/tabular' " Some auto-complete for haskell Plug 'neovimhaskell/haskell-vim' +Plug 'vmchale/ion-vim' + call plug#end() diff --git a/init/settings.vim b/init/settings.vim index 42a6a2d..1d2cc21 100644 --- a/init/settings.vim +++ b/init/settings.vim @@ -55,3 +55,6 @@ set undodir=./.vim/undo// " Increases speed of CoC and Gitgutter set updatetime=250 + +" Make Vim use pipes instead of temp files when running commands +" set noshelltemp diff --git a/init/terminal.vim b/init/terminal.vim new file mode 100644 index 0000000..e69de29