Commit Graph

1443 Commits

Author SHA1 Message Date
Christian Brabandt
d4a239f14a Make airline aware of git worktrees
Currently vim-airline assumes, that the git_dir is part of the path for
the file being edited. This has changed, since git supports worktrees.

So take care of b:git_dir (which is set by fugitive) being a path
differently from the absolute path of the file being edited (however, it
should include the substring worktree in that case).
2016-11-23 16:33:12 +01:00
Christian Brabandt
3ebd7ad64b Merge pull request #1331 from flatcap/master
Abbreviate the text for 'po' translation files.
2016-11-23 08:15:19 +01:00
Richard Russon
4e93a90441 Abbreviate the text for 'po' translation files.
A typical status line for a 'po' (Portable Object) translation file is:

  1152 translated messages, 91 fuzzy translations, 42 untranslated messages.

Adding a substitute(), tidies this to:

  1152 translated, 91 fuzzy, 42 untranslated

which is still informative, but less verbose.
2016-11-22 11:24:10 +00:00
Christian Brabandt
c02d774b05 Merge pull request #1327 from gregorias/nvim_git_issue
Do not forward v:shell_error on command fail.
2016-11-20 16:47:32 +01:00
Grzegorz Milka
241f324b39 Do not forward v:shell_error on command fail.
airline#system#util for nvim used to fall back to 'system' implementation on
command error. This behavior caused conflict with other plugins if 'util' was
executed with a failing command as part of a ShellCmdPost event.

This commit makes 'util' interpret command error as persistent and not call
'system' in such a case.

This commit fixes #1317.
2016-11-20 10:16:13 +01:00
Christian Brabandt
2dae2b364e Merge pull request #1314 from tbodt/patch-1
add vim-bufmru to the list of integrated plugins
2016-11-15 18:58:03 +01:00
Theodore Dubois
a314038280 add vim-bufmru to the list of integrated plugins 2016-11-05 09:16:03 -07:00
Christian Brabandt
258430db82 Merge pull request #1312 from gregorias/async
Use neovim's async job's instead of system
2016-11-04 21:22:32 +01:00
Grzegorz Milka
433d5d8f97 Use neovim's async job's instead of system
This commit makes branch.vim use neovim's async jobs instead of a system()
function. This way we avoid the v:shell_error overwrite bug and allow live
updates of the untracked status.
2016-11-04 19:09:05 +01:00
Christian Brabandt
545617f4f4 Merge pull request #1311 from watagashi/fix_lawrencium
Fix when using vim-lawrencium
2016-11-04 07:52:32 +01:00
WADA Takashi
e7056db27a Fix when using vim-lawrencium 2016-11-04 10:54:39 +09:00
Grzegorz Milka
3899f848a7 Adapt data structures of branch.vim to async
* The head string is now calculated iff it has changed.
* The not exists symbol for current file appears as soon as its status is known.
* Fixes various problems with asynchronous status checking, such as:
  * The not exists symbol keeps appearing and disapearing. This happened when
    file was marked as not existing, the untracked cache was invalidated, and
    the cache update is started, but in the meantime, the head string
    calculation used the current (empty) value of the cache.
  * The not exists symbol never appears, because cache keeps getting invalidated
    before b:airline_head is emptied and updated.

closes #1306
2016-11-03 21:03:13 +01:00
Christian Brabandt
02ecb8631d fix missing part of commit 3bd6cb5ee4
There was a part missing of #3bd6cb5ee4981227
add it back
2016-11-03 17:54:50 +01:00
Christian Brabandt
6dae3452db Fix order of statements
Commit #3bd6cb5ee498 causes an error, because a variable was used
before it was declared. Fix this.
2016-11-03 17:26:32 +01:00
Grzegorz Milka
3bd6cb5ee4 Refactor branch.vim to avoid code duplication
* Introduce a config variable that holds the vcs-dependent parts of code.
* Removes `get_*_untracked` duplication by merging their logic together.
* Removes custom checks for 'git' or 'hg'. Functions now rely on provided config
  argument.
* Use loops instead of manually specifying each handled VCS.

closes #1303
2016-11-03 17:19:17 +01:00
Christian Brabandt
b97d7a11f4 mention notexists symbol in documentation 2016-11-03 14:01:27 +01:00
Christian Brabandt
516870bf9f Check for correct async condition
fixes #1308
2016-11-02 16:43:47 +01:00
Christian Brabandt
0ea4daa103 Merge pull request #1297 from chrisbra/mq
Add mq status for hg repositories
2016-10-26 20:47:45 +02:00
Christian Brabandt
98fe4eabd4 Merge pull request #1299 from gregorias/fix_git_untracked
Display not exists symbol correctly in Git repos
2016-10-26 20:47:28 +02:00
Grzegorz Milka
2af2bdb424 Display not exists symbol correctly in Git repos
This commit fixes a bug, where untracked files in Git repos did not get the not
exists symbol displayed. The fix works by replacing the previous check for
whether currently edited file is a directory or not with a check based on
`findfile`. More detailed explanation follows.

VCS extension to vim-airline checks whether currently edited file is untracked.
The previous `s:get_git_untracked` implementation, which was used for the
aforementioned purpose for Git repos, was buggy, because it did not return the
untracked symbol in most situations, i.e. the edited file is untracked, but it
was treated as if it wasn't.
The root cause was the second clause in boolean expression checking the output
of `git status`:

    if output[0:1] is# '??' && output[3:-2] is? a:file

It was added to make sure we are not checking a directory, but at this point in
the program `a:file` is an absolute path, while output of `git status` is a
relative path from the root of git repo. So the `is?` expression failed in most
situations.
2016-10-25 19:26:44 +02:00
Christian Brabandt
5fe511c20b Merge pull request #1298 from chrisbra/shorten_mode
Shorten mode message for small windows
2016-10-25 08:01:07 +02:00
Christian Brabandt
58e7e276fa Merge pull request #1302 from chrisbra/loaded_extensions
guard against loading extensions twice
2016-10-25 08:00:25 +02:00
Christian Brabandt
6a155fabda guard against loading extensions twice
fixes #1300
2016-10-24 12:14:30 +02:00
Christian Brabandt
69020706b2 Shorten mode message for small windows 2016-10-20 22:57:26 +02:00
Christian Brabandt
14ab47cae6 Add mq status for hg repositories
Now that we have async feature for Vim 8, we can add the output of 'hg
qtop' back to the statusline if it is supported
2016-10-20 22:46:24 +02:00
Christian Brabandt
64d91665fe Merge pull request #1294 from asbhat/master
on_exit function fix if self.file is missing
2016-10-19 08:08:06 +02:00
Aditya
be6e3db68b
on_exit function fix if self.file is missing 2016-10-18 22:23:07 -04:00
Christian Brabandt
8964603844 fix missing declaration 2016-10-14 11:14:33 +02:00
Misha Brukman
2dc2748804 Remove Bitdeli as it's defunct. 2016-10-14 10:36:21 +02:00
Bjorn Neergaard
06351e86df Add support for ALE, the Async Linting Engine
Ale is a plugin that lints text in the background, as you type!

It is new, but under [rapid development](https://github.com/w0rp/ale).
2016-10-14 10:36:21 +02:00
Bjorn Neergaard
45e5c907be Add support for flattened and NeoSolarized themes
These are forks/alternate versions of Solarized, without many of the
dynamic elements or the extensive terminal support.

[flattened](https://github.com/romainl/flattened) is a basic, totally
static version of Solarized with only ansi and GUI support.

[NeoSolarized](https://github.com/iCyMind/NeoSolarized) is a version
focusing on true/24-bit color support and NeoVim support, with limited
dynamic options.

[solarized8](https://github.com/lifepillar/vim-solarized8) is a version
focusing on vim/neovim true color support and limited dynamics. It is
already supported (`match()` matches it), but it is at least worth
noting.

Many users, including myself, use these themes over the original
Solarized for performance or technical reasons. Many users believe they
are incompatible with airline because automatic theming no longer
functions. While they can manually override the theme, most people seem
to miss this option in the documentation and give up.

It would be a nice quality of live improvement if airline detected these
themes and enabled its own Solarized theme automatically to match.
2016-10-14 10:36:21 +02:00
Christian Brabandt
4f8a16c31e fixup for async feature 2016-10-14 10:36:21 +02:00
Christian Brabandt
81ccd3bdf6 po-extension: Make asyncable 2016-10-14 10:36:21 +02:00
Christian Brabandt
c39e5f82cc check for existence of git/hg before calling them 2016-10-14 10:36:21 +02:00
Christian Brabandt
f706edee9f init async global variables 2016-10-14 10:36:21 +02:00
Christian Brabandt
57ca6c9e78 include workaround from c1704a2de0
add workaround from commit c1704a2de0 to prevent overwriting
v:shell_error
2016-10-14 10:36:21 +02:00
Christian Brabandt
ffa3d59af2 branch ext: use async functions for system() commands
Make use of vim 8 async functionality and use it to get the vcs status
for the branch extension.

Won't work with neovim.

fixes #1266
2016-10-14 10:36:21 +02:00
Christian Brabandt
75a0199a7d Merge pull request #1279 from bentomas/master
Fix whitespace symbol empty string has extra space
2016-10-07 09:04:39 +02:00
Benjamin Thomas
78439b2b35 Fix whitespace symbol empty string has extra space
This makes it so if the whitespace symbol (g:airline#extensions#whitespace#symbol) is an empty string, we don't end up wth two characters at the beginning of the message.
2016-10-02 01:22:50 -07:00
Christian Brabandt
2be9a044e0 Updated Issue template 2016-09-28 22:13:54 +02:00
Christian Brabandt
7a736021ee Merge pull request #1276 from chrisbra/tabline_bug
do not skip empty sections for the tabline
2016-09-27 22:46:04 +02:00
Christian Brabandt
f5359f9177 do not skip empty sections for the tabline
commit #3d667c32d3ac04 fixed a bug, that a section was not considered
empty for the statusline, also g:airline_skip_empty was set.

However unfortunately, this lead to a regression, makeing the tabline
ugly, because sections, that contained a single highlighting group would
be considered empty and would therefore be skipped. Since this is not
what is expected, make s:section_is_empty() return zero, when it notices
we are looking at a tabline.

fixes #1273
2016-09-27 21:44:00 +02:00
Saad Malik
3c33251ee7 Support for neomake
Added support for neomake plugin; similar to syntastic.
Shows warning and error counts in the airline statusbar.
2016-09-27 21:21:35 +02:00
Christian Brabandt
1c052e39b1 Merge pull request #1271 from chrisbra/highlighter_bug
Use the correct highlighting for the inactive window
2016-09-26 21:13:02 +02:00
Christian Brabandt
29c556dba4 use correct groupname for inactive windows
airline_c (which contains the filename) usually is used together with
the buffer number, so that several windows showing the a different
buffer do not share the same highlighting group.

This was fixed in 73aea86a, but unfortunately it was forgotten to not
only add this to the current group, but also modify the previous group
accordingly. This is what this patch does.

fixes #1268
2016-09-26 21:12:15 +02:00
Christian Brabandt
5ee2cd9acf Merge pull request #1269 from chrisbra/1231
for empty sections, make test return true
2016-09-25 20:25:08 +02:00
Christian Brabandt
3d667c32d3 for empty sections, make test return true
fixes #1231
2016-09-24 22:06:41 +02:00
Christian Brabandt
513afd25bc Merge pull request #1263 from thawk/master
Set script encoding to avoid script parsing problem in non UTF-8 VIM
2016-09-24 21:55:50 +02:00
thawk
45d77ca909 Add 'scriptencoding utf-8' to all scripts 2016-09-24 08:16:30 +08:00
Christian Brabandt
c1704a2de0 Do not overwrite v:shell_overwrite after ShellCmdPost
Prevents resetting v:shell_error from the followin system() call in
get_git_untracked.

Fixes #1266
2016-09-23 16:11:53 +02:00