Commit Graph

1897 Commits

Author SHA1 Message Date
Christian Brabandt 326b37cf13
help: document tag airline#extensions#tabline#exclude_buffers 2018-09-20 10:13:59 +02:00
Christian Brabandt 1b8ecb6336
Merge pull request #1796 from flemingfleming/wordcount-improvements
[WIP] Rewrite wordcount plugin
2018-09-20 10:04:53 +02:00
Liam Fleming 0756b9a4aa wordcount: Re-enable updating the format string 2018-09-18 20:12:17 +01:00
Christian Brabandt 251ed064e8
Make mode return only single letter except for virt replace mode
commit bcd37fc115 changed the detection of modes slightly in that it
allowed not only single letters but also several letters.

While in theory, it might be okay to have extra modes displayed like
Insert Completion or Normal Insert, or Operator Pending, let's for now
just revert it to the default. We can always enhance it later if
requested.
2018-09-18 20:00:46 +02:00
Liam Fleming c33c1de079 wordcount: Simplify update strategy
Checking for wordcount changes now uses a b:changedtick comparison in
the statusline funcref. The autocommand strategy that used to do this is
removed, simplifying the code.
2018-09-18 16:05:01 +01:00
Liam Fleming 9903fee60e wordcount: Optimise formatter calls, cleanup code
- Formatter is now only called when the wordcount changes
- ...#apply() now only compares against the filetype list when necessary
- Old format() function is no longer called for (unsupported) counting
  of visual words
- Misc code quality improvements
2018-09-18 15:13:43 +01:00
Liam Fleming 487d262901 wordcount: formatter: code quality improvements
- Rename new formatting function: transform() -> to_string()
- Optimise separator selection
- Other quality improvements
2018-09-18 02:04:35 +01:00
Christian Brabandt a1c112cafd
main: replace and virt replace mode should use same coloring
fixes #1794
2018-09-16 20:01:00 +02:00
Christian Brabandt bcd37fc115
mode: add support for virt replace mode
fixes #1792
2018-09-16 18:25:27 +02:00
Christian Brabandt aec0a1a15a
languageclient: Check severity key before accessing it
closes #1793
2018-09-16 18:17:04 +02:00
Christian Brabandt da8035d8a8
Merge pull request #1789 from danielwe/master
Fix bug introduced in #1788: Don't use the read-only `count` as local variable
2018-09-10 09:52:34 +02:00
Daniel Wennberg cda5647a29 Don't use the read-only `count` as local variable
The variable name `count` is always equivalent to `v:count`, which is
a read-only variable and cannot be assigned to.
2018-09-09 23:51:11 -07:00
Christian Brabandt f5676d1fa1
Merge pull request #1788 from hallettj/extension/languageclient
Extension to report errors and warnings from LanguageClient plugin
2018-09-10 07:36:15 +02:00
Jesse Hallett a92b12e1c6 Implement extension to report errors and warnings from LanguageClient plugin 2018-09-09 23:53:08 -04:00
Christian Brabandt d342c3cb1e
Merge pull request #1785 from smancill/conditional-vimtex-loading
Load vimtex only when the extension is enabled
2018-09-07 08:01:33 +02:00
Sebastián Mancilla c3434164b2 Load vimtex only when the extension is enabled
Do not force loading the full vimtex autoload script for all users.
First check if the extension is enabled.
2018-09-06 13:15:38 -03:00
Liam Fleming 8715d13cc5 wordcount: Refactor updating and autocmds
Various improvements:
 - Seperate out visual mode detection.
 - Use TextChanged rather than CursorMoved where supported.
 - Let users specify the filetypes for which wordcounting is enabled
   with a list rather than a pattern.
 - Move the filetype check to when airline is refreshed, as opposed to
   on every update; autocommands are not created if wordcounting is
   disabled
2018-07-28 19:26:24 +01:00
Liam Fleming 44da0a4761 wordcount: Replace formatter interface
Currently the formatter, and not the wordcount plugin, is responsible
for providing the wordcount as well as formatting it. The default
formatter allows visual mode word counting, although this is not
documented.

The new interface - a transform() function, allows the main wordcount
plugin to internalise this logic. Providing the wordcount simplifies
formatter implementations:
 - All formatters can display the visual wordcount.
 - Formatters do not have to worry about compatibility with different
   vim versions.

The old format() function can now be deprecated, although the wordcount
plugin retains compatibility with formatters using it. The default
formatter will also be used as a fallback if no suitable function is
found.

The default formatter is rewritten to use the new interface.
2018-07-28 18:24:12 +01:00
Christian Brabandt c7fb175d35
Add a specific color for commandline mode
closes #1768

Colors for the other themes need to be defined however
2018-07-26 10:22:40 +02:00
Christian Brabandt 59f3669a42
Merge pull request #1770 from shyun3/pullreq
Add vim-grepper extension
2018-07-24 19:16:22 +02:00
Mo Hyun 60eb44c94e Fix build error 2018-07-23 14:27:59 -07:00
Mo Hyun 723987eca9 Add vim-grepper extension
- Displays a segment when a grepper search is running
2018-07-23 13:05:34 -07:00
Christian Brabandt 964f53a418
Merge pull request #1767 from tpope/fugitive-real-path
Update to new Fugitive real path API
2018-07-23 08:11:18 +02:00
Tim Pope a8ccef61ba Update to new Fugitive real path API 2018-07-22 15:39:54 -04:00
Christian Brabandt 4cc255a384
tests: Fix tabline tests 2018-07-13 22:35:05 +02:00
Christian Brabandt eac10a104f
tests: add test for tabaline 2018-07-13 22:30:20 +02:00
Christian Brabandt 5aef1b90e5
tabline: Correctly trigger on BufDelete autocommand
fixes #399
2018-07-13 22:29:34 +02:00
Christian Brabandt 821372b9cf
tabline: re-map tabline keys
fixes #1753
2018-07-13 21:33:03 +02:00
Christian Brabandt db45cdd994
Merge pull request #1759 from tpope/fugitive-path
Fixes for fugitiveline
2018-07-13 21:22:42 +02:00
Liam Fleming 781c40bb3d Create AirlineModeChanged autocmd 2018-06-28 18:44:26 +01:00
Tim Pope 9bee0e923e Use FugitivePath in fugitiveline if available 2018-06-27 18:07:59 -04:00
Tim Pope 66e49d9a15 Fix fugitiveline when file is also branch name 2018-06-27 18:05:09 -04:00
Christian Brabandt b790fd2120
Merge pull request #1750 from Mangero/arduino-whitespace
Add Arduino to list of C-like languages
2018-06-18 08:39:53 +02:00
Christian Brabandt c3a814dbae
Merge pull request #1749 from flemingfleming/autocmd-improvements
Autocmds: Move CursorMoved autocmd into the main augroup.
2018-06-18 08:39:17 +02:00
Mangero a141918faa
Add Arduino to list of C-like languages
Add 'arduino' filetype to list of C-like languages. This is needed in
order to avoid mix-indent-file warnings when using hard tabs for
indentation in Arduino source files (*.ino, *.pde) containing top level
block comments with leading space before a '*'.

Similar to: 460ed02864
Original fix: 8fde76dd63
2018-06-18 01:09:56 +02:00
Liam Fleming 11bc0ba843 Move CursorMoved autocmd to main augroup 2018-06-16 20:34:07 +01:00
Christian Brabandt 45c9621157
Merge pull request #1744 from flemingfleming/fix-function-signatures
add "!" to function signatures
2018-06-13 20:06:17 +02:00
Liam Fleming feca81fb86 add "!" to function signatures 2018-06-13 17:52:13 +01:00
Christian Brabandt 4f95970228
branch: use :noa before calling async func
for some reasons, calling async functions might cause an error, if a
SourcePre command has been defined. So explicitly call the functions
using `:noa` modifier to prevent triggering the SourcePre autocommand.

fixes #1742
2018-06-11 14:45:29 +02:00
Christian Brabandt 7d871137be
Correctly test for CompleteDone event 2018-06-09 10:50:25 +02:00
Christian Brabandt 6a05b92716
Merge pull request #1732 from shirohana/fix/integrate-with-ctrlspace
airline#extension#ctrlspace: Fix tabline didn't update when enable both buffers and tabs
2018-06-05 11:23:12 +02:00
Christian Brabandt 55716a1cc2
Remove wrong comment for TerminalOpen autocmd 2018-06-05 11:22:07 +02:00
Hana Shiro acb93da0d8 Fix tabline didn't update when enable both buffers and tabs 2018-06-05 06:11:14 +08:00
Christian Brabandt add75907d5
Merge pull request #1738 from shirohana/fix/ctrlspace-tabline-switching
airline#extensions#ctrlspace: Fix tabline didn't update when switch to tab which focused on non-listed buffer
2018-06-04 22:56:22 +02:00
Christian Brabandt eab6d35852
terminal: Some improvements to Terminal detection
closes #1730

- Make sure to always call the term extension on TermOpen autocommands
- consistently use the airline_term highlighting group
- hard code the airline_term highlighting group, because by the time the
  function airline#themes#patch() is called the highlighting group
  airline_c would no be defined, so we cannot dynamically get those
  attributes
- In the documentation, mention how the g:airline_mode_map can be set
  including the terminal section
2018-06-04 22:44:46 +02:00
Christian Brabandt 1bb1ce594a
Formatter: Use pathshorten() instead of substitute()
The default formatter uses a hand-build regexp for shortening the path
in the tabline. However, since it uses the \w  regex atom, this won't
match e.g. cyrillic letters.

To fix this, use the builtin pathshorten() function which does handle
this case correctly. For a test, use e.g. 'D/Учёба/t.c'

closes #1737
2018-06-04 21:59:16 +02:00
Christian Brabandt 044a90ed55
use get(v:, 'lang', '') instead of v:lang
closes #1735
2018-06-04 21:45:46 +02:00
Christian Brabandt 981b83003f
fugitive: Use FugitiveHead() instead of fugitive#head
function if possible and use it instead of the fugitive#head
(which will always autload the fugitive plugin).
2018-06-04 18:32:30 +02:00
Christian Brabandt a1680cc36d
fugitive: Check for existence of FugitiveStatusline function
as per @tpopes advice.
2018-06-04 17:42:33 +02:00
Christian Brabandt 30a3c4f549
branch: fugitive renamed its functions
this caused that the branch extension was not correctly working anymore
because of a refactoring of fugitive tpope/vim-fugitive@5d11ff7

Solution: Move the existence check for the fugitive plugin into a
separate function and call it from there in all places that check the
fugitive plugin. Do the same for lawrencium and vcscommand check.

fixes #605 #1739
2018-06-04 17:38:49 +02:00