127 Commits

Author SHA1 Message Date
d29cfc6aab Remove support for _template snippets 2023-03-30 15:28:42 +01:00
0c515161b0 Add coc.nvim mapping for references used 2023-02-15 16:58:03 +00:00
0d4dab892e Don't ignore case in command line file completions 2023-01-26 17:52:11 +00:00
24de16b587 Drop UltiSnips and move to coc-snippets
Also change the completion confirm mapping to <TAB> and make the
priority of snippets higher.
2023-01-25 00:40:41 +00:00
877d90dd90 Fix windows switching mappings when not in tmux 2023-01-09 23:20:15 +00:00
86659d8db6 Don't use signcolumn=number 2022-11-25 12:33:33 +00:00
e066388627 Fix statusline light highlight colors 2022-11-11 11:06:56 +00:00
ee5110efd8 Remove minpac in preparation for using Ansible 2022-11-08 11:21:08 +00:00
330329ef2b Replace ad hoc conflict markers with plugin 2022-11-07 14:27:13 +00:00
4c142d2fa5 Only setup cursor shape in vim, not nvim
Neovim already changes cursor shape by default, there's no need to
override it.
2022-11-06 11:12:06 +00:00
db5ebc701d Bump unmap Y version check 2022-02-18 19:51:29 +00:00
e6e3a10c87 Don't unmap Y before nvim 0.5
This version check might need some refinement, not actually sure when it
was introduced but it's deffo not in 0.4.4.
2022-02-15 10:53:58 +00:00
caa83e88d2 Undo neovims default mapping of Y to y$ 2022-01-14 20:03:07 +00:00
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
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
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
9cc1ac8d87 Fix statusline background higlights in gui 2021-07-10 14:42:12 +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
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
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
3a44fa1e48 Fix vim :terminal window mappings 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
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
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
9c64158445 Replace vim-gitgutter with vim-signify
vim-gitgutter is buggy. vim-signify might be better, it does allow
configuration of which events trigger a sign column update and this
patch takes advantage of that. Firstly, the `CursorHold` and
`CursorHoldI` events are disabled and replaced with `InsertLeave` and
`TextChanged` events. This makes the sign column updates immediate, and
since vim-signify is asynchronous it's faster too.
2021-01-26 23:45:49 +00:00
eac02b26d3 Add xterm-kitty to list of supported $TERM values 2021-01-25 21:37:09 +00:00
aaa8acf5a2 Update build#dir() to open a popup_menu()
Use `popup_menu()` in `build#dir()` when the `:BuildDir` command is uses
without an argument to specify a build directory. If there are no build
directories, print an error message. If there is a single build
directory, use it. If there are multiple build directories use
`popup_menu()` to prompt the user to select the desired build directory.

Update `build#targets()` and `build#run()` with comments and error
messages.
2021-01-06 00:23:32 +00:00
a0df92852a Add :Build command to invoke ninja or make
The `:Build [<target> ...]` command utilises the `$BUILD_DIR` variable set
by `:BuildDir {directory}` to invoke `ninja` or `make` based on the
existence of `$BUILD_DIR/build.ninja` or `$BUILD_DIR/Makefile`
respectively. The following commands are invoked in a new `:terminal`
window.

* `ninja -C $BUILD_DIR [<target> ...]` when `$BUILD_DIR/build.ninja` exists
* `make -C $BUILD_DIR [<target> ...]` when `$BUILD_DIR/Makefile` exists

In the case of `ninja`, completion for the targets supplied to the
`:Build` command is made available by the `build#targets()` function.
The list of targets returned by `ninja -C $BUILD_DIR -t targets` is
processed to generate the list of targets. Support for `make` target
completion is less straight forwards so has been omitted for now.
2021-01-05 21:45:43 +00:00
c17f7ea0d9 Refactor tmux and set-clipboard detection
Move logic to `autoload/tmux.vim` to detect the `vim` is being run
inside a `tmux` sessions and if the `set-clipboard` option is enabled.
This cleans up adding the optional `oscyank.vim` plugin when needed.
2020-12-10 18:07:24 +00:00
76acb9cd90 Once again fix minpac initialization 2020-12-10 17:41:17 +00:00
e4a11a2ffe Fix package load init order bugs
* Move calls to `minpac#init()` into commands which use minpac
* Check if optional package directories exist before using `packadd`
2020-11-28 17:16:11 +00:00
9e6169695d Use the patience diff method 2020-10-07 11:30:48 +01:00
d960053dfc Add :BuildDir to select YouCompleteMe build directory 2020-10-06 17:12:06 +01:00
3449b3f815 Disable automatic hover in YouCompleteMe 2020-07-21 12:01:41 +01:00
8fac5fb74f Add OSC 52 escape sequence yank
If the `tmux` `set-clipboard` option is set to `on` add the `osc52yank`
plugin and change `<leader>y` mapping to use it.
2020-04-02 12:12:57 +01:00