Fix NUL file created when opening a .po file.
Using -o NUL actually creates a file called NUL in the current
directory. Using /NUL doesn't create one in C:\ (the drive the file is
located on) or any visible drive.
Despite msgfmt being able to create the file NUL (which isn't supposed
to be allowed), it's difficult to delete NUL (windows explorer can't
handle it but WSL's unix rm can remove it).
Test
Open po file and see the same warnings as before, but no NUL file
created.
Using msgfmt.exe provided by git (installed via scoop).
The current implementation of tagbar does not allow for setting the
search-method in the `tagbar#currenttag` function. In
https://github.com/preservim/tagbar/pull/696, tagbar implemented this,
which has three options: nearest, neartest-stl, and scoped-stl.
The reason for adding this - for me, at least - is to use the scoped-stl
option, so that the statusline will display the proper function when
there are nested functions. (Otherwise, once you go past a nested
function, tagbar#currenttag still returns the nested function rather
than the function it was nested in.)
Check for differing neovim versions with different APIs for LSP.
Fixes#2324
Consists of two tests:
1. Before extension load, test if this is neovim and whether this neovim
supports LSP
2. When getting diagnostic counts, test whether a language server is
attached to the current buffer
closes#2324
Note: seems like one needs to call v:lua.vim.lsp.buf_get_clients() and
even then some older neovims do not understand that. So wrap it around
an exists() call and hope this works for all neovims.
nvimlsp removed the :LspInstallInfo command. So instead check explicitly
for neovim for enabling the nvimlsp extension.
In the extension itself check that at least one LSP is attached to the
buffer before returning warning and error messages.
closes#2323
Fix: a literal '0' appears after filename on older versions of vim-lsp.
0c8164b1b3 added support for showing lsp
progress, but didn't always explicitly return a value. Vim uses 0 as a
return value when none are supplied, so when used with an older version
of vim-lsp that doesn't have the progress feature a 0 appeared in the
statusline.
Included `.vue` extension to jsformatter for supporting Vue.js files. Vue files follows the same path resolution as js files: https://vue-loader.vuejs.org/spec.html#src-imports
Case sensitive comparison for jsformatter
closes#2314#2154
Add a leading space before the searchcount statistics. Note, that this
uses a non-breaking space, because it looks like Vim is stripping aways
leading space characters (see vim/vim#1431)
This is needed for Neovim, because an external UI could be attached to
the same neovim server, so it does not make sense to define highlighting
groups with either only the cterm or the guifg attribute set.
So refactor the code slightly got get rid of this variable (and since
this variable is not needed anymore, we can also get rid of the guienter
and OptionSet autocommand).
fixes: #2261
Now it can be configured to show only when localsearch is disabled. It
is useful if you mostly keep localsearch enabled and don't want to keep
seeing the extra 'LS' section, but still want to have some kind of a
visual indication about when localsearch is disabled.
This improves the term extension in a few ways.
First it fixes some vint warnings about case sensitive comparisons.
Next it makes the active and inactive variants consistent, as well as
making the line number display consistent to other buffer types. This
was one of the main reasons to do this, because the inclusion of the
Neoterm ID in a previous pull request made inactive terminal status
lines look really inconsistent compared to the active ones.
Further this now shows the Neoterm ID in both active and inactive
buffers in Airline section B. It also removes the now redundant
Neoterm IDs from the buffer name in both Neovim and Vim.
Finally the cosmetic buffer name is now used for both active and
inactive variants.
This was causing persistent errors when you run, for example,
```
ls | nvim -c 'setf dirvish'
```
as dirvish will not yet have set that local variable yet airline will
attempt to use it.
when using `Ctrl-O` from insert mode, the highlighting currently updates
from insert mode highlighting to normal mode highlighting.
Unfortunately, changing the highlighting can be a bit expansive, so
redefining the highlighting just for one simple command does not make
too much sense.
Instead, keep the insert mode highlighting, because that's kind of like
the major mode Vim is in currently. The mode message uses '(INSERT)' to
distinguish between a "normal" INSERT mode and this temporary INSERT
mode, so it should still be visually be distinguishable.
closes#2217
• Fixed shortening of message. It was not showing more than one digit for fuzzy and untranslated strings.
• Fixed case when starting translation (0 translated), and accomodated for some bigger po catalogs (more than 1000 strings)
• Add support for Windows (I use it on Windows, it works fine with latest Vim. Didn't test Neovim or older Vim versions, though)
• Add one extra space character to the right of the output string
This fixes issue when using Plug to conditionally loading NrrRgn:
Plug 'chrisbra/NrrwRgn', {'on': ['NR', 'NW', 'NRV', 'NW', 'NarrowRegion']}
The command will exist but the plugin has not been loaded yet which gives a warning message.
If there is a single terminal window in the current tabpage, the whole
long command will be displayed in the tabline, even when it should be
shortened by default.
By default the title will not be shown if there are several windows in
the current tabpage, but if there is only one single terminal window, it
will still be shown (and might be a bit long). But I guess, it is better
to just show a possible too long terminal window name, than not show
anything).
fixes#2126
Fixes issue #2142.
These changes primarily focused on making the include guards more robust
and simplify how the path for w:airline_section_c was generated.
Credits goes to @kazukazuinaina for improving on my original
implementation.
Matched VCS format of Netrw to only show branch name.
Filetype hidden as it is a duplicate on the left side.
File encoding hidden as it does not matter in dirvish buffer.
Removed unnecessary current column information
As requested by the coc maintainer, this is explicitly disabled, unless
the user configures vim-airline to use it for the branch extension. This
is done, because the `CocAction('extensionStats')` function is known to
be slow and this may cause a slow startup.
if g:loaded_youcompleteme does not exists, the ycm extension will not be
loaded. However extensions.vim could still try to init the ycm
extension, which would lead to an error message:
E117: unknown function airline#extensions#ycm#init
so make sure, it is only loaded, if ycm is loaded as well.
Put a word-boundary regex atom before and after the current filetype, to
make sure that a `C` filetype won't be detected as a filetype that
enables the wordcount extension. (`c` matches asciidoc).
Because changes plugin does not rely on git
Also remove the test of the local variable for the changes plugin
whether it is enabled or not, this is taken care of in the changes
plugin
The coc-git extension to coc does show similar statistics as e.g.
gitgutter, therefore, integrate the coc-git interface into the hunk
extension.
closes#2094
[Pandoc flavoured Markdown](https://en.wikipedia.org/wiki/Markdown#CommonMark) has its [own file type in `vim`](https://github.com/vim-pandoc/vim-pandoc-syntax#standalone), namely `markdown.pandoc`.
Word count by default in `vim-airline` obviously would make a lot of sense for this popular file type.
Fix this, by making sure that the wordcount extensions will apply
correctly if any of the combined filetypes (e.g. either pandoc or
markdwon) matches the list of allowed filetypes.
Fix#2062: restore g:airline_focuslost_inactive behaviour.
Only ignore focusgained events on Windows. If there are more problematic
platforms, we'll add them later.
Instead of ignoring the next x FocusGained events whenever we do call
system(), ignore them for the current second. That allows us to put a
hard limit on the duration of the ignore.
This seems like a much better solution than the previous one because it
also prevents ignore events from building up (s:focusgained_ignored was
often greater than 5).
Test (gvim 8.2.140 on Win10)
gvim.exe ~/.vim/bundle/airline/autoload/airline/extensions/branch.vim
:Gedit HEAD
check several parents and no regression of looping behaviour from #2053.
:let g:airline_focuslost_inactive = 1
:split
alt-tab several times and statusline is correctly dimmed and restored
each time.
closes#2029
airline#util#focusgain(1) was called too soon -- it's called before vim
loses focus and not after it gains focus. Instead, we ignore the next
FocusGained event.