521 Commits

Author SHA1 Message Date
c9711deade Only display coc#status() in regular active buffer
The statusline is only dynamically updated for the active buffer, thus
when there are multiple splits the statusline for inactive buffers may
include non-updated output of `coc#status()`. This patch adds a boolean
flag to `statusline#generic()` which enables `statusline#active()` and
`statusline#inactive()` to control when `coc#status()` is included in
the statusline.
2021-07-14 17:33:54 +01:00
0961c13316 Use compdb to post-process compile_commands.json
When selecting a `:BuildDir` for the `clangd` LSP use `compdb` to
post-process the `compile_commands.json` to also include flags for
stand alone header files.
2021-07-14 11:38:21 +01:00
eabec4e9b6 Add build#dir() popup_menu() fallback
When `popup_menu()` is not available, i.e. neovim or old version of vim,
fallback to using `inputlist()` instead.
2021-07-13 21:00:48 +01:00
7491736987 Don't set nospell in requirements.txt 2021-07-12 13:47:00 +01:00
c26d837047 Add init.vim as a regular file 2021-07-12 13:41:26 +01:00
38b8ab2fae Remove init.vim symlink 2021-07-12 13:41:04 +01:00
30c601e8b3 Add pip requirements.txt syntax highlighting 2021-07-12 13:36:44 +01:00
2188095b2f Always use fresh colorscheme on Windows
Windows Terminal has support for 256 color so there is not need to
restrict where to use `fresh` as the `colorscheme`.
2021-07-11 16:53:22 +01:00
a881d3e62a Add nvim-qt configuration
Set font and colorscheme for `nvim-qt`.
2021-07-10 14:49:16 +01:00
2ab332db65 Don't use tmux navigation mappings on Windows
Since `tmux` integration is not enabled on Windows, don't use the
`vim-tmux-natigation` command mappings for movingin between splits.
2021-07-10 14:46:52 +01:00
dbff00b6fc Make init.vim work on Windows
Symbolic links committed to Git repositories do not work on Windows.
Repalce the `init.vim` symbolic link with a regular file which loads
`vimrc`, this should work on all platforms.
2021-07-10 14:43:39 +01:00
9cc1ac8d87 Fix statusline background higlights in gui 2021-07-10 14:42:12 +01:00
34073608c8 Update Python main snippet 2021-05-30 20:51:55 +01:00
06335a18da Change vim-signify changed sign from ! to ~ 2021-05-22 17:02:04 +01:00
4a47908717 Customize coc.nvim highlights in fresh colorscheme 2021-04-27 23:37:06 +01:00
6053174173 Don't let coc.nvim highlight the number column 2021-04-27 23:36:49 +01:00
0315c070f5 Customise coc.nvim signcolumn signs 2021-04-27 18:01:33 +01:00
05b047f374 Add coc.nvim next/previous diagnostic mappings 2021-04-27 17:34:54 +01:00
455c1f1b94 Move statusline truncation market after mode 2021-04-20 23:20:51 +01:00
46283e3b95 Remove unused vim-gitgutter mappings 2021-04-19 20:28:08 +01:00
0f1b35eda3 Don't call coc#status() if it doesn't exist 2021-04-19 20:10:29 +01:00
9aa45a4df5 Use coc-jedi and coc-pyright instead of coc-pyls 2021-04-19 20:10:29 +01:00
78e821e386 Add a call to coc#status() in statusline
Don't miss out on the status of coc.nvim by insuring updates are
rendered in the statusline.
2021-04-19 20:10:29 +01:00
2b02d0ae81 Ignore compiled python files 2021-04-19 20:10:29 +01:00
f00eb38200 Fix coc.nvim mappings in C/C++ files 2021-04-19 20:10:29 +01:00
46d27c17fd Move formatexpr config in-tree, out of plugin
Introduces the `format` Python module which provides `clang_format()`
and `yapf()` functions which efficiently (compared to vimscript) invoke
`clang-format` or `yapf` respectively then apply the minimal number of
changes using `difflib.SequenceMatcher`.

Additionally, in order to invoke these Python functions add |autoload|
functions `format#clang_format()` and `format#yapf()` which can be
directly used by the 'formatexpr' setting.

Finally, add |ftplugin| files which set 'formatexpr' when the |autoload|
functions are available.
2021-04-19 20:10:29 +01:00
4e00e225d4 Don't show signcolumn when filetype man 2021-04-18 14:42:33 +01:00
3a44fa1e48 Fix vim :terminal window mappings 2021-04-18 14:42:33 +01:00
96ff72433d Change yaml default syntax highlights 2021-04-18 14:42:33 +01:00
837aa12f9f Replace osc52yank.vim with autoload script 2021-04-18 14:42:33 +01:00
41a0658cf2 Always enable signcolum except in nvim terminal 2021-04-18 14:42:33 +01:00
3a2337cd63 Add do#show_documentation() using coc.nvim
Change the `K` normal mode overrides to use the example given in the
coc.nvim README file which uses Vim's builtin help when in `vim` or
`help` files, or checks if coc.nvim is ready and invokes
`CocActionAsync('doHover')`, otherwise fallback to using `keywordprg`.
2021-04-18 14:42:33 +01:00
ecd8659df7 Use tab width of 2 in yaml files 2021-04-18 14:42:33 +01:00
d6106bac84 Add statusline support for nvim's man pager filetype 2021-04-18 14:42:33 +01:00
873acacaa6 Make terminal mode feel like insert mode statusline 2021-04-18 14:42:33 +01:00
c284486540 Make nvim :terminal more consistent with vim
Vim's :terminal feels much more ergonomic, adding various mappings to
make the experience more similar, mainly by adding a few `<C-w>`
mappings for the most common actions.

Additionally, disable vim-tmux-navigators default mappings and setup
both normal and terminal mode mappings for `<C-w>{h,j,k,l}` in addition
to the normal mode mappings for `<C-{h,j,j,l}>` to make the pane
switching experience more consistent across all buffer types.
2021-04-18 14:42:33 +01:00
587aeef5d7 Use signcolumn=number when available 2021-04-18 14:42:33 +01:00
c67f11a8f5 Fix statusline l:mode map indentation 2021-04-18 14:42:33 +01:00
cef963d805 Remove a unused scriptencoding
There are no utf-8 special characters in the file anymore.
2021-04-18 14:42:33 +01:00
dc6a8b0032 Get rid of scrolloff 2021-04-18 14:42:33 +01:00
9a1b1ed2fc Replace vim-airline with a custom statusline
Finally got round to making a custom statusline after being inspired by
https://pastebin.com/Fm1NEgBf
2021-04-18 14:42:33 +01:00
bee751201d Add list of global coc extensions 2021-04-18 14:42:33 +01:00
eb1a4a71d8 Check if .vim directory exists before use
Update `build#dir()` to check for the existence of the `.vim` directory
containing `coc_settings.json` before attempting to read the file. If it
doesn't exist then create it.
2021-04-18 14:42:33 +01:00
bf6deaf1ed Configure cmake-language-server and coc-cmake
Utilises the following Python package:

```console
$ pip3 install --user cmake-language-server
```
2021-04-18 14:42:33 +01:00
8a2ca8c53f Update build#dir() to configure coc-clangd 2021-04-18 14:42:33 +01:00
824aeb431a Replace remaining YouCompleteMe mappings 2021-04-18 14:42:33 +01:00
4a99f582f3 Replace YouCompleteMe with coc.nvim 2021-04-18 14:42:33 +01:00
3b3121aa28 fresh: NonText as SpecialKey
Don't use `set highlight` to highlight `NonText` like `SpecialKey`,
instead simply set the color of `NonText` in the colorscheme.
2021-04-18 14:42:33 +01:00
82303f075e Move RST settings together 2021-02-06 11:05:23 +00:00
92a23103e3 Fix vim-tmux-focus-events errors in command-line
When changing focus away and back to vim while in the middle of editing
the command-line, vim-tmux-focus-events emits errors from the function
called by the `:cnoremap` mappings. This patch replaces these mappings
with a call to `do#sink()` which does nothing. Simply removing the
mappings will result in `<F24><F25>` being inserted on the command-line
since tmux will send this text when `tmux set-option -g focus-events
on`, this is why `do#sink()` is needed.
2021-01-27 19:23:13 +00:00