Commit Graph

1782 Commits

Author SHA1 Message Date
Christian Brabandt
5d7e656081
fugitive: remove old fugitive test
As mentioned by @tpope, remove the old test for the autoloaded function
fugitivie#head() and instead use consistently FugitiveHead() everywhere
2022-05-21 21:58:11 +02:00
Sven Berkvens-Matthijsse
396116b059
Mark the end of the close button
Not marking the end makes the rest of line (after the close button) also clickable and react as if the close button was clicked. That is very confusing and incorrect behavior.
2022-05-06 08:51:14 +02:00
Christian Brabandt
13628d698d
scrollbar: allow to customize minimum window width
closes #2531
2022-05-05 23:09:33 +02:00
Christian Brabandt
d421c35f94
Merge pull request #2529 from zoumi/master
make exclude pattern works when there are more than one tabpages
2022-05-05 23:05:30 +02:00
Christian Brabandt
0241bdb804
fugitiveline: leading zeros dropped in buffername
fixes #2533
2022-05-05 20:17:45 +02:00
zoumi
ce0e8d7e82 make exclude pattern works when there are more than one tabpages 2022-04-30 10:44:58 +08:00
Paul Fernandez
04bf4eabca
Changed bufloaded back to buflisted
The last PR (#2522) caused some issues for me, and the author @KSR-Yasuda suggested that this change could be the culprit. `__CtrlSF__` and `[No Name]` tabs appearing, and adding them to `airline#extensions#tabline#ignore_bufadd_pat` just made the whole tabline disappear.

I also use the Startify plugin with session saving, and found that when restoring a session, the tabs would no longer appear until I had visited a buffer again, whereas beforehand they would load up a soon as I opened Vim. So I commented out my entire vimrc, and could reproduce this issue by opening an existing session with `vim -S mysession`. Without this fix, only a single buffer from the session is shown in the tabline.

I'm using regular Vim, version 8.2 on MacOS 12.3.1.
2022-04-11 10:54:01 -07:00
yasuda
35af3bf37f tabline: Fix tab label being named wrongly
- Manage `nobuflisted` windows together
    - If a tab has no `buflisted` window,
      the tab label is named from default buffer name.
- Fix default buffer name selection from wrong tab
    - It has picked up default buffer name from active tab,
      not from the target tab.
2022-04-07 09:09:45 +09:00
Jonathan Müller
927e142e94 Don't use flags in spell when spelllang disabled
In vimscript, `0 ==? 'foo'` is true, as it converts the string to a
number which results in 0 for non-numeric strings.
2022-03-29 22:50:13 +02:00
Christian Brabandt
a306a7abfd
Merge pull request #2514 from patricknraanes/main
Enable display country flag instead of spelllang
2022-03-23 20:58:16 +01:00
Christian Brabandt
1d486430cc
neovim: support global statusline and do not truncate too early
With Neovims recent merge of a global statusline (e.g. a statusline that
is the same across all windows), make sure that truncation only happens,
by checking the complete terminal window width instead of using the Vim
window width (similar to when using g:airline_statusline_ontop).

related: #2517
2022-03-23 19:40:21 +01:00
patricknraanes
2706bdc949 Enable display country flag instead of spelllang 2022-02-28 17:29:47 +01:00
Christian Brabandt
e2498d72dc
taglist: avoid v:true/v:false 2022-02-28 15:47:24 +01:00
Christian Brabandt
24f2878080
mode: add several new modes
fixes #2499 #2498
2022-02-28 15:47:24 +01:00
James Rowe
031e6ee4b2
unicode: Trivial quote change for vint error 2022-02-28 15:47:24 +01:00
James Rowe
21cdbea7e6
unicode: Fix check for :UnicodeTable buffer 2022-02-28 15:47:24 +01:00
Adrian Trunzo
d1f6514cef
Test for the correct fern loaded variable. 2022-02-28 15:47:24 +01:00
Jeff Pitman
20d77c3220
builder: bugs in is_empty_section
The current way to parse the statusline content and decide whether a
section is empty, has some flaws:

That is for the following reasons:
- accents are considered to be empty (which they really shouldn't)
- manually parsing the expressions using a
  `:while ... matchlist() ... endwhile` loop is slow and fragile
- grouping items such as %( %) are not considered

So replace the logic by using `substitute('pat', '\=add()', '')` to
capture all single expression groups into a list and then looping over
those to decide whether the section is empty.

fixes #2411
2022-02-28 15:47:24 +01:00
Ilia Choly
9a3568b815 nvimlsp: use vim.diagnostic.get() if available 2021-12-10 14:51:19 -05:00
Christian Brabandt
bf5d785932
virtualenv: Enable for additional filetypes beside python
So with https://github.com/jmcantrell/vim-virtualenv you can display the
virtualenv in your statusline section (if you have enabled it). However
it would only become active for python buffers.

Now perhaps you want to show the virtualenv also in other filetypes like
markdown or CI scripts, so allow this by adding a variable
`airline#extensions#virtualenv#ft'` to the list of filetypes you want to
have enabled. So set:

    let g:airline#extensions#virtualenv#enabled = 1
    let g:airline#extensions#virtualenv#ft = ['python', 'markdown']

To allow displaying the virtual environment for python and markdown
buffers (but remember you need to have the plugin
https://github.com/jmcantrell/vim-virtualenv installed as well!)

fixes #2483
2021-12-08 11:23:42 +01:00
Gauravsingh Sisodia
8e36c0a8ed
main: ignore popup windows for inactive windows
When openning popup (vim) or floating (neovim) windows,
do not consider those windows for disabled windows. That is, leave the
main window in activate state instead of marking it disabled

closes: #2387
2021-12-05 19:05:15 +01:00
Christian Brabandt
de73a21903
tabline: Give error message, if switching buffers is not possible
When using Neovim and switching to another buffer with the mouse and the
current buffer is modified, Vim refuses to switch buffers rightfully,
if the user has not set 'hidden' or 'autowrite' (because it is going to
unload the buffer from memory).

So catch this case and let the user know.

Note: :b! would be another possibility, but I do not prefer using this
attribute, because it is not clear what happens to the current buffer. I
think it is made hidden, but I prefer to be explicit here

closes #2478
2021-12-05 18:52:27 +01:00
Christian Brabandt
841a355196
Merge pull request #2472 from indelog/indelog_vim9lsp
Add extension for yegappan/lsp
2021-11-26 10:31:26 +01:00
Indelog
8df0f3db4b Add extention for yegappan/lsp
Show errors and warnigs with yegappans/lsp plugin.
2021-11-26 10:12:11 +01:00
Tama McGlinn
2ed11e9536 Add support for flog with git status summary 2021-11-25 18:09:40 -05:00
Michael Monsivais
6716572b30 taglist: load taglist variants only once
Because Tlist_Get_Filenames() only exists within yegappan/taglist,
TlistUpdate was being envoked on every call when using other taglist
versions.(Like vim-scripts/taglist.) This caused visual artifacts and
slowdowns.

We now check for a function from both taglist variants to see if either
one has been loaded.
2021-11-19 10:15:15 -07:00
Christian Brabandt
4b96f58902
Merge pull request #2462 from KSR-Yasuda/feature/CustomSpellCheckCommand
Custom Spell Check Command Support
2021-11-12 13:06:26 +01:00
Indelog
ec761c2adf
taglist: correctly check for right taglist plugin
Avoid the error `Unknown function: taglist#Tlist_Get_Tagname_By_Line`
when using the old tag tlist plugin in a different way.

this means, we have to revert 5841039679
since exists() does not handle autoloaded functions correctly.

We can only check it, after we have used the taglist plugin, so that the
autoloading has happened. That means, move the exists() call after the
`:TListUpdate` call which will correctly autoload taglist and then
exists() can check for the existence of the
`taglist#Tlist_Get_Tagname_By_Line()` function correctly.

closes: #2463
2021-11-12 13:04:45 +01:00
Christian Brabandt
5841039679
taglist: check that correct function exists
So 47bf6b1716 added support for
yegappan/taglist plugin, but unfortunately the old (deprecated)
vim-scripts/taglist.vim repo still exists and this one throws an error
when trying to access taglist#Tlist_Get_Tagname_By_Line

So check, that this function is defined before trying to load the
extension
2021-11-12 09:32:50 +01:00
yasuda
646dd0a1c2 Custom spell check command support
- Add an option `g:airline_spell_check_command`
2021-11-12 11:45:58 +09:00
Christian Brabandt
6e5439126f
wordcount: allow to disable vimtex wordcount()
While Commit e542f5e introduced a nice little feature for TeX files to
accurately count words, this unfortunately has the drawback of being
possibly slow, especially since the statusline is often re-evaluated.

Therefore disable this feature by default. You can enable it using:

    :let g:airline#extensions#vimtex#wordcount = 1

fixes #2461
2021-11-11 22:51:02 +01:00
Indelog
d134ae8c2f Add extention to support yegappan/taglist 2021-11-11 14:26:49 +01:00
Christian Brabandt
70904d7070
Merge pull request #2458 from fritzlolpro/patch-1
Allow user to hide CoC status in the section C
2021-11-10 11:24:50 +01:00
Dood of Distinction
e542f5e9d0
Modifies the wordcount to use the vimtex wordcount function when editing TeX files and the vimtex plugin is loaded.
With help from Karl Lervag's suggestion on how to reliably tell when the
above mentioned conditions are the case for the current buffer

Checked to work with other filetypes that use the wordcount in
vim-airline, and these seem to work as before.

Also checked that if two of these filetypes (one TeX and the other
another type, such as markdown) the two coexist peacefully, with TeX
using Karl's wordcount function, and the other using the (I assume)
native wordcount?

Fixed comment wording
2021-11-09 22:02:15 +01:00
Christian Brabandt
17f7dff748
Merge pull request #2457 from ytian81/remove_hunks_dependency_on_branch
Remove gitgutter hunks summary dependency on branch
2021-11-03 20:50:19 +01:00
Fedor
f0ee8f193e
Allow user to hide CoC status in the section C
Hello.
This PR should solve my pain as CoC user, that CoC status takes too much space in the C section, right after the file path. 
It looks like a waste of space on splitscreen or a small screen.

So I added an option to set
g:airline#extensions#coc#show_coc_status = 0
and the status will be hidden. 

By default it works like usual.
2021-11-03 15:27:47 +03:00
Yang Tian
0dd6f5e711 remove gitgutter dependecy on branch 2021-11-03 00:24:08 -07:00
Bea Hughes
6800c9ea7f Add vim-rufo extension support to section z.
Displays whether you have the ruby formatter enabled or not for the
session you are in.

Enable with:
let g:airline#extensions#rufo#enabled = 1

Configure with:
let g:airline#extensions#rufo#symbol = '💎'
2021-11-01 10:36:33 -07:00
Christian Brabandt
26f922753a
coc-extension: remove dead code
vim-airline does not use actually use the `g:coc_stl_format` variable
and it also doesn't seem to be used by coc itself. So let's just remove
this code.

closes #2437
2021-09-21 08:43:30 +02:00
Christian Brabandt
0a7e1bc475
style: Remove colon 2021-09-21 08:43:30 +02:00
wzy
78cb6e6621
Fix bug of g:airline_symbols.spell == '' 2021-08-16 14:41:49 +08:00
zeertzjq
969c13c716 Don't show "gina" in diff buffers if b:gina_initialized is not set 2021-08-07 19:28:15 +08:00
Evan Chen
0f3feca572
Allow overriding trailing ws regexp per buffer
For example, in a github repository, you might want to allow trailing
double spaces in a file, but not elsewhere
2021-08-03 21:35:22 -07:00
kazukazuinaina
ec4bbabe4a [fix] issue #2338
add check airline_stl_path_style's flag and pathshortln api
2021-07-12 02:26:52 +09:00
kazukazuinaina
9b113a02f5 [refactor] use Ternary operator 2021-07-06 02:37:52 +09:00
Christian Brabandt
49cdcb7b3e
vim9: Needs at least version 8.2.22844 2021-06-07 13:44:53 +02:00
Adrian Trunzo
fdda58861b Correct line number for coc.nvim warnings.
- The line number index is 0 for errors, 1 for warnings.
2021-06-03 14:23:44 -06:00
Andrzej Ostruszka
3882146c41 Change event for tabline autoshow
Use TabNew/TabClosed for the "autoshow" event when tabline is used only
for tabs (show_buffers==0).  This fixes case of visible tabline when
tab_min_count == 2 and user executes ':tabonly' command - the tabline
should disappear but there is no TabEnter event triggered in this case.

Closes #2389
2021-05-27 08:29:30 +00:00
Christian Brabandt
b6f6cc9312
autoload: fix error with vim74 2021-05-26 13:26:47 +02:00
Aaron Adams
98aea41dc2
Warn if a function is already registered for inactive statusline
closes #2388
2021-05-26 13:09:04 +02:00