Commit Graph

1231 Commits

Author SHA1 Message Date
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
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
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
Mo Hyun
723987eca9 Add vim-grepper extension
- Displays a segment when a grepper search is running
2018-07-23 13:05:34 -07:00
Tim Pope
a8ccef61ba Update to new Fugitive real path API 2018-07-22 15:39:54 -04: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
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
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
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
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
Hana Shiro
c7d4710f76 Refactor airline#extentions#tabline#ctrlspace#* 2018-06-02 23:41:15 +08:00
Hana Shiro
6e1e6686e7 Fix problems caused by #1524 2018-06-02 21:22:00 +08:00
Hana Shiro
a6e07b6a55 Remove unused catch block 2018-06-02 14:04:25 +08:00
Hana Shiro
4db6d11962 Fix indentation 2018-06-02 13:59:08 +08:00
Hana Shiro
ac799f6021 Rename parameters for better readability 2018-06-02 13:49:32 +08:00
Hana Shiro
92bf1b0b39 Use ternary-operator 2018-06-02 13:02:49 +08:00
Christian Brabandt
b84e13f1d7
Blacklist startify for [noperm]
Startify unfortunately does not set the buftype option, so the
`[noperm]` would be shown, since the buffer is not really a file.
(see mhinz/vim-startify#324)

So allow to blacklist startify from this setting. To do so, the logic
from the tabline extension was refactored out into a separate function
that returns true, if the buffer matches
`g:airline#extensions#tabline#ignore_bufadd_pat` and that function is
then reused for the readonly() function as well.
2018-05-11 22:32:20 +02:00
Christian Brabandt
c7e05efb76
Only consider regular files for the '[noperm]'
Recently, NERDTree added the &readonly setting to its buffer.
Unfortunately, this caused airline to render the '[noperm]' string in
it.

Fix this by only making the readonly check for buffers that actually
represent files (e.g. the buftype option is empty).
2018-05-11 09:53:55 +02:00
iroedius
15bc732df4 allow to also disable trailing whitespace check per filetype 2018-04-28 07:34:59 +02:00
Christian Brabandt
33310c5b24
whitespace: Allow to disable individual whitespace checks per filetype
closes #1716
2018-04-27 08:25:49 +02:00
Stanislav Gobunov
c4a4a20b8d
xkblayout: Make Short codes configurable
airline#extensions#xkblayout#short_codes changed to global for easily redefine long named keyboard layout

closes #1713
2018-04-18 10:46:55 +02:00
Christian Brabandt
a76f523be5
bufferline: always add a space for the very first item
closes #1631
2018-04-15 10:16:28 +02:00
mg979
f7c818a0ff
add xtabline extension 2018-04-14 14:03:21 +02:00
Christian Brabandt
0df2c9b12e
Merge pull request #1700 from mox-mox/master
Add extension for vim-localsearch
2018-04-09 13:27:44 +02:00
mox
00f718691a Adding localsearch extension (code and documentation). See https://github.com/mox-mox/vim-localsearch 2018-04-09 00:47:23 +02:00
Christian Brabandt
d66b507b02
Merge pull request #1683 from idbrii/add-custom-scm
Make branch detection customizable
2018-04-08 21:56:32 +02:00
David Briscoe
8209ca7da1 Make branch detection customizable
Instead of requiring each version control plugin to modify airline to
show the current branch, provide a customization function we can check
instead.

Following the example of airline_theme_patch_func, you define the
variable like so:

    let g:airline#extensions#branch#custom_head = 'david#svn#get_branch'

Custom functions should cache their value. They may need an autocmd to
invalidate their cache:

    " Use a buffer-unique group name to prevent clearing autocmds for other
    " buffers.
    exec 'augroup svndavid-'. bufnr("%")
        au!
        autocmd BufWinLeave <buffer> unlet! b:svndavid_branch
    augroup END

This change lets me integrate with vc.vim (I couldn't get VCSCommand
working for svn) or write my own thing for perforce.

Additionally, always load whole file and check for existence.

Instead of determining up front whether various scm plugins are
installed, check for them on use so they can be added after this script
is sourced.

This also mitigates the problem of checking for existence of autoload
functions (which are not loaded by exist()). Since we're checking
root-level functions, they're likely to be loaded once we're using any
part of the plugin.
2018-04-06 09:40:17 -07:00
Christian Brabandt
902921931e
Simplify airline#init#gui_mode()
remove all the old code that is probably not used anymore
2018-04-06 02:21:20 +02:00
Christian Brabandt
ae394294c3
gutentags: output correct statusline message
fixes #1703
2018-04-06 02:14:10 +02:00
Christian Brabandt
bf3cc5ad9d
NerdTree: make the statusline configurable
Use the g:NerdTreeStatusline variable for configuring the
NerdTree statusline in the NerdTree window

closes #1705
2018-04-06 01:52:23 +02:00
Christian Brabandt
47bdae9067
Merge pull request #1702 from mrmr1993/fix-buffer-counts
Fix buffer numbering to start from 1 with buffer_idx_mode
2018-04-03 03:16:38 +02:00
Gianni Chiappetta
023fe122c5
Support typescript in jsformatter 2018-04-02 11:29:18 -04:00
mrmr1993
fbf96559c9 Fix buffer numbering to start from 1 with buffer_idx_mode
275ec4fe63 broke this so that numbering
started from 0 instead of 1 with
g:airline#extensions#tabline#buffer_idx_mode = 1

Specifically, I overlooked that |index| actually tracked the index of
the current buffer in the buffer list *starting from 1*, whereas I
assumed it tracked the true index (starting from 0).
2018-04-02 01:04:43 +01:00
Christian Brabandt
2ba64a88fd
Merge pull request #1691 from silenc3r/master
ALE: add option to disable line numbers
2018-04-01 14:13:29 +02:00
Christian Brabandt
f0b969549a
Merge pull request #1693 from mrmr1993/current-tabs-visible-experiments
Rework tabline for tabs and buffers
2018-04-01 14:01:17 +02:00
mrmr1993
47c36d2819 Don't let the current buffer be -1 when calculating the tabline 2018-04-01 01:17:18 +01:00