Update nvim ALE config
This commit is contained in:
@@ -1 +1,2 @@
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
@@ -21,9 +21,12 @@ set hidden
|
||||
|
||||
set smartindent
|
||||
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
" et = expandtab (spaces instead of tabs)
|
||||
" ts = tabstop (the number of spaces that a tab equates to)
|
||||
" sw = shiftwidth (the number of spaces to use when indenting
|
||||
" -- or de-indenting -- a line)
|
||||
" sts = softtabstop (the number of spaces to use when expanding tabs)
|
||||
set et sts=4 sw=4 ts=4
|
||||
|
||||
set foldenable
|
||||
set foldmethod=indent
|
||||
|
||||
@@ -8,4 +8,3 @@ endif
|
||||
source $XDG_CONFIG_HOME/nvim/base.vim
|
||||
source $XDG_CONFIG_HOME/nvim/plugins.vim
|
||||
source $XDG_CONFIG_HOME/nvim/mappings.vim
|
||||
|
||||
|
||||
@@ -22,60 +22,70 @@ Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
|
||||
" === Languages === "
|
||||
" lint
|
||||
Plug 'dense-analysis/ale'
|
||||
" minimap
|
||||
Plug 'severin-lemaignan/vim-minimap'
|
||||
|
||||
" Intellisense Engine
|
||||
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
|
||||
|
||||
" fzf
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
" elm
|
||||
Plug 'elmcast/elm-vim'
|
||||
|
||||
" Python
|
||||
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
|
||||
" indent guides
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
|
||||
" DOcumentation GEneraton
|
||||
Plug 'kkoomen/vim-doge'
|
||||
|
||||
|
||||
" Trailing whitespace highlighting & automatic fixing
|
||||
Plug 'ntpeters/vim-better-whitespace'
|
||||
|
||||
|
||||
" auto-close plugins
|
||||
Plug 'rstacruz/vim-closer'
|
||||
Plug 'tpope/vim-endwise'
|
||||
|
||||
|
||||
" Improved motion in Vim
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
Plug 'tpope/vim-surround'
|
||||
|
||||
|
||||
" Snippet support
|
||||
Plug 'Shougo/neosnippet'
|
||||
Plug 'Shougo/neosnippet-snippets'
|
||||
|
||||
|
||||
" Print function signatures in echo area
|
||||
Plug 'Shougo/echodoc.vim'
|
||||
|
||||
|
||||
" Enable git changes to be shown in sign column
|
||||
Plug 'mhinz/vim-signify'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" Comment out lines
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
" fzf
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
|
||||
" === Languages === "
|
||||
" Intellisense Engine
|
||||
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
|
||||
Plug 'liuchengxu/vista.vim'
|
||||
|
||||
" lint
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
" Trailing whitespace highlighting & automatic fixing
|
||||
Plug 'ntpeters/vim-better-whitespace'
|
||||
|
||||
" Languages
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
" elm
|
||||
Plug 'elmcast/elm-vim'
|
||||
|
||||
" js
|
||||
Plug 'othree/yajs.vim'
|
||||
|
||||
" Python
|
||||
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
|
||||
Plug 'Vimjas/vim-python-pep8-indent'
|
||||
|
||||
" Initialize plugin system
|
||||
call plug#end()
|
||||
|
||||
|
||||
|
||||
" ============================================================================ "
|
||||
" === PLUGIN SETUP === "
|
||||
" ============================================================================ "
|
||||
@@ -97,17 +107,30 @@ let g:NERDTreeIgnore = ['\.git$[[dir]]']
|
||||
|
||||
let g:elm_setup_keybindings = 0
|
||||
|
||||
let g:ale_fix_on_save = 1
|
||||
let g:ale_lint_on_text_changed = 'always'
|
||||
let g:ale_lint_delay = 1000
|
||||
let g:ale_sign_error = '\ '
|
||||
let g:ale_sign_warning = '\ '
|
||||
let g:ale_sign_error = '>>'
|
||||
let g:ale_sign_warning = '--'
|
||||
|
||||
let g:ale_linters = {
|
||||
\ 'python': ['flake8', 'pylint'],
|
||||
\ 'typescript': ['prettier', 'tslint'],
|
||||
\ 'javascript': ['prettier', 'eslint'],
|
||||
\ 'scss': ['prettier'],
|
||||
\ 'html': ['prettier'],
|
||||
\}
|
||||
|
||||
let g:ale_fixers = {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\ 'cpp': ['clang'],
|
||||
\ 'python': ['yapf'],
|
||||
\ 'typescript': ['prettier', 'tslint'],
|
||||
\ 'javascript': ['prettier', 'eslint'],
|
||||
\ 'scss': ['prettier'],
|
||||
\ 'html': ['prettier'],
|
||||
\}
|
||||
let g:ale_linters = {
|
||||
\ 'python': ['flake8']
|
||||
\}
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
|
||||
let g:airline_theme='badwolf'
|
||||
|
||||
@@ -241,3 +264,7 @@ endfunction
|
||||
if exists('g:loaded_webdevicons')
|
||||
call webdevicons#refresh()
|
||||
endif
|
||||
|
||||
let g:indent_guides_enable_on_vim_startup = 1
|
||||
let g:indent_guides_start_level = 2
|
||||
let g:indent_guides_guide_size = 1
|
||||
|
||||
@@ -14,7 +14,6 @@ export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring && pip3 install --us
|
||||
npm install -g neovim elm-format
|
||||
sudo gem install neovim
|
||||
|
||||
|
||||
echo "Running PlugInstall";
|
||||
nvim --headless +PlugInstall +PlugUpgrade +PlugUpdate +qall
|
||||
nvim --version
|
||||
|
||||
@@ -8,15 +8,16 @@ from subprocess import run, CalledProcessError
|
||||
import pytest
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# Helper functions
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Helper functions
|
||||
# --------------------------------------------------------------------------- #
|
||||
def in_path(binary: str) -> bool:
|
||||
"""
|
||||
Helper function to check whether `binary` is in PATH.
|
||||
"""
|
||||
return find_executable(binary) is not None
|
||||
|
||||
|
||||
def in_shell_path(shell: str, binary: str) -> bool:
|
||||
"""
|
||||
Helper function to check whether `binary` is in interactive shell's PATH.
|
||||
@@ -29,11 +30,13 @@ def in_shell_path(shell: str, binary: str) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# Test fixtures
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Test fixtures
|
||||
# --------------------------------------------------------------------------- #
|
||||
shells: List[str] = [
|
||||
'sh', 'bash', 'fish',
|
||||
'sh',
|
||||
'bash',
|
||||
'fish',
|
||||
]
|
||||
|
||||
binaries: List[str] = [
|
||||
@@ -42,16 +45,27 @@ binaries: List[str] = [
|
||||
*shells,
|
||||
|
||||
# tools
|
||||
"git", "nvim",
|
||||
"firebase", "aws", "terraform",
|
||||
"docker", "docker-compose",
|
||||
"git",
|
||||
"nvim",
|
||||
"firebase",
|
||||
"aws",
|
||||
"terraform",
|
||||
"docker",
|
||||
"docker-compose",
|
||||
"screenfetch",
|
||||
|
||||
# language: python
|
||||
"pyenv", "python3", "pip3", "poetry",
|
||||
"pyenv",
|
||||
"python3",
|
||||
"pip3",
|
||||
"poetry",
|
||||
|
||||
# langauge: js
|
||||
"nvm", "node", "npm", "yarn", "elm",
|
||||
"nvm",
|
||||
"node",
|
||||
"npm",
|
||||
"yarn",
|
||||
"elm",
|
||||
]
|
||||
|
||||
|
||||
@@ -63,6 +77,7 @@ def test_shells(shell: str):
|
||||
""" Assert all shells we expect are in PATH. """
|
||||
assert in_path(shell)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("binary", binaries)
|
||||
@pytest.mark.parametrize("shell", shells)
|
||||
def test_binaries(shell: str, binary: str):
|
||||
|
||||
Reference in New Issue
Block a user