1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

chore: formatting and fix spell errors

This commit is contained in:
jdhao 2021-08-07 02:44:57 +08:00
parent d434627738
commit 8dffa8bd23
9 changed files with 20 additions and 20 deletions

View File

@ -5,7 +5,7 @@
# Introduction
This repo hosts my Nvim configuration for all the platforms I am using (Linux,
Windows and macOS). `init.vim` is the config entrypoint for terminal Neovim,
Windows and macOS). `init.vim` is the config entry point for terminal Neovim,
and `ginit.vim` is the additional config file for GUI client of Neovim (I am
using [neovim-qt](https://github.com/equalsraf/neovim-qt) for now on Windows).
@ -40,7 +40,7 @@ backward compatibility is guaranteed.**
+ Markdown writing and syntax highlighting via [vim-markdown](https://github.com/plasticboy/vim-markdown),
Markdown Previewing via [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim).
+ Command line auto-completion via [wilder.nvim](https://github.com/gelguy/wilder.nvim).
+ Annimated GUI style notifiation via [nvim-notify](https://github.com/rcarriga/nvim-notify).
+ Animated GUI style notification via [nvim-notify](https://github.com/rcarriga/nvim-notify).
+ Tags navigation via [vista](https://github.com/liuchengxu/vista.vim).
+ Source code linting via [Ale](https://github.com/dense-analysis/ale).
+ Code formatting via [Neoformat](https://github.com/sbdchd/neoformat).

View File

@ -11,7 +11,7 @@ function! text_obj#URL() abort
endif
endif
" We need to find all possible URL on this line and their start, end idx.
" We need to find all possible URL on this line and their start, end index.
" Then find where current cursor is, and decide if cursor is on one of the
" URLs.
let line_text = getline('.')
@ -54,10 +54,10 @@ function! text_obj#URL() abort
endfunction
function! text_obj#MdCodeBlock(type) abort
" the parameter type specify whether it is inner text objects or arround
" the parameter type specify whether it is inner text objects or around
" text objects.
" Move the cursor to the end of line in case that cursor is on the openning
" Move the cursor to the end of line in case that cursor is on the opening
" of a code block. Actually, there are still issues if the cursor is on the
" closing of a code block. In this case, the start row of code blocks would
" be wrong. Unless we can match code blocks, it not easy to fix this.

View File

@ -41,7 +41,7 @@ function! utils#HasAirlinetheme(name) abort
return !empty(globpath(&runtimepath, l:pat))
endfunction
" Generate random integers in the range [Low, High] in pure vimscrpt,
" Generate random integers in the range [Low, High] in pure vim script,
" adapted from https://stackoverflow.com/a/12739441/6064933
function! utils#RandInt(Low, High) abort
" Use lua to generate random int. It is faster. Ref: https://stackoverflow.com/a/20157671/6064933
@ -152,7 +152,7 @@ function! utils#Inside_git_repo() abort
if match(res, 'true') == -1
return v:false
else
" Manually trigger a speical user autocmd InGitRepo (to use it for
" Manually trigger a specical user autocmd InGitRepo (to use it for
" lazyloading of fugitive by packer.nvim).
" See also https://github.com/wbthomason/packer.nvim/discussions/534.
doautocmd User InGitRepo

View File

@ -92,6 +92,6 @@ endfunction
augroup git_repo_check
autocmd!
autocmd VimEnter,DirChanged * call utils#Inside_git_repo()
autocmd VimEnter,DirChanged * call utils#Inside_git_repo()
augroup END
"}

View File

@ -76,7 +76,7 @@ set fileformats=unix,dos " Fileformats to use for new files
set inccommand=nosplit " Show the result of substitution in real time for preview
" Ignore certain files and folders when globbing
" Ignore certain files and folders when globing
set wildignore+=*.o,*.obj,*.bin,*.dll,*.exe
set wildignore+=*/.git/*,*/.svn/*,*/__pycache__/*,*/build/**
set wildignore+=*.jpg,*.png,*.jpeg,*.bmp,*.gif,*.tiff,*.svg,*.ico

View File

@ -36,10 +36,10 @@ let g:UltiSnipsSnippetDirectories=['UltiSnips', 'my_snippets']
"{{ Language specific plugin
"""""""""""""""""""""""""" semshi settings """""""""""""""""""""""""""""""
" Do not highlight for all occurances of variable under cursor
" Do not highlight for all occurrences of variable under cursor
let g:semshi#mark_selected_nodes=0
" Do not show error sign since linting plugin is specicialized for that
" Do not show error sign since linting plugin is specialized for that
let g:semshi#error_sign=v:false
"""""""""""""""""""""""""" vlime settings """"""""""""""""""""""""""""""""
@ -160,7 +160,7 @@ let g:vista_stay_on_open = 0
nnoremap <silent> <Space>t :<C-U>Vista!!<CR>
"}}
"{{ File editting
"{{ File editing
""""""""""""""""""""""""vim-auto-save settings"""""""""""""""""""""""
" Enable autosave on nvim startup
let g:auto_save = 1
@ -209,7 +209,7 @@ let g:better_escape_interval = 200
let g:XkbSwitchEnabled = 1
"}}
"{{ Linting and formating
"{{ Linting and formatting
"""""""""""""""""""""""""""""" neoformat settings """""""""""""""""""""""
let g:neoformat_enabled_python = ['black', 'yapf']
let g:neoformat_cpp_clangformat = {
@ -306,7 +306,7 @@ nmap s <Nop>
omap s <Nop>
"}}
"{{ LaTeX editting
"{{ LaTeX editing
""""""""""""""""""""""""""""vimtex settings"""""""""""""""""""""""""""""
if ( g:is_win || g:is_mac ) && executable('latex')
function! SetServerName() abort
@ -427,7 +427,7 @@ let g:airline#extensions#hunks#non_zero_only = 1
" Speed up airline
let g:airline_highlighting_cache = 1
" The key in the following shortcode are the layout when we use a specific
" The keys in the following shortcode are the layout when we use a specific
" input method mode. On my macOS, 0 means that we are trying to input Chinese,
" and 1 means we are using English mode.
" See also https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/extensions/xkblayout.vim#L11

View File

@ -103,7 +103,7 @@ Set its PATH properly and make sure you can call `ctags` from command line.
## Ripgrep
[Ripgrep](https://github.com/BurntSushi/ripgrep), aka, `rg`, is a fast greping
[Ripgrep](https://github.com/BurntSushi/ripgrep), aka, `rg`, is a fast grepping
tool available for both Linux, Windows and macOS. It is used by several
searching plugins.
@ -199,7 +199,7 @@ setups.
I use [packer.nvim](https://github.com/wbthomason/packer.nvim) to manage my
plugins. We need to install packer.nvim on our system first.
For Windows, if curl is installed, use the following command (on Powershell):
For Windows, if curl is installed, use the following command (on PowerShell):
```
git clone --depth=1 https://github.com/wbthomason/packer.nvim "$env:LOCALAPPDATA\nvim-data\site\pack\packer\start\packer.nvim"

View File

@ -37,7 +37,7 @@ local on_attach = function(client, bufnr)
autocmd CursorHold <buffer> lua require('config.lsp').show_line_diagnostics()
]]
-- Set some keybinds conditional on server capabilities
-- Set some key bindings conditional on server capabilities
if client.resolved_capabilities.document_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
end

View File

@ -82,7 +82,7 @@ require('packer').startup(
-- Another grep tool (similar to Sublime Text Ctrl+Shift+F)
-- use 'dyng/ctrlsf.vim'
-- A greping tool
-- A grepping tool
-- use {'mhinz/vim-grepper', cmd = {'Grepper', '<plug>(GrepperOperator)'}}
-- A list of colorscheme plugin you may want to try. Find what suits you.
@ -213,7 +213,7 @@ require('packer').startup(
-- carefully to use its full power
use 'wellle/targets.vim'
-- Plugin to manipulate characer pairs quickly
-- Plugin to manipulate character pairs quickly
-- use 'tpope/vim-surround'
use 'machakann/vim-sandwich'