Profiling with below
nvim -c 'profile start vim.log' -c 'profile func *' -c 'q'
shows that neomake adds to the start up time. Currently we only use it
for two tasks. Running hlint for Haskell and stack build asynchronously.
Use asyncdo and define a generic wrapper command for running makeprg
asynchronously. This can be used for anything as long as makeprg is
set correctly.
vim-grepper also adds somewhat to the startup time though not much. We
do not need the functionality of switching between grep tools. Here
again just use asyncdo and define a generic command for running grepprg
asynchronously.
Drop QFGrep as we can use in built Cfilter plugin for filtering the
quickfix list.
Note that all start times mentioned above are a few milliseconds not
even more than 5ms. However, we would like to be as fast as possible
and use in built functions.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Drop polyglot and add the necessary language support manually. While at
it disable some internal plugins and drop vim-qlist. qlist is only useful
if path is set correctly and it can search for files as indicated by the
path. Since we do not do this, it does not add any value.
Add vim-tmux-focus-events back again. As per this thread
https://github.com/tmux-plugins/vim-tmux-focus-events/issues/1
neovim shouldn't require this plugin however the observation seems that
it's required.
Gitgutter quickfix entries should be loaded in quickfix and not location
list.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Use this so we do not pollute clipboard history. Also since neovim
depends on a provider which transparently uses shell commands to
communicate with the system clipboard, it seems this adds around 80ms
to start up.
074.721: sourcing /usr/share/nvim/runtime/autoload/provider/clipboard.vim
This plugin should allow us to depend on it only when required.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
:(. Gruvbox doesn't cut it, nor does jellybeans. Back to molokai.
Color scheme taken from
https://github.com/fatih/molokai
We add this to our own colors directory while dropping terminal color
support as we have terminal GUI colors option set. Also change the
background color to be completely black like we want it. Also drop the
auto command as it is not required anymore.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Back at this again as it loads faster and did not realise last time that
the background can be over ridden with an auto command group to be set
to complete black. The auto command group must be read first before
setting of the color scheme that's why the autocmd file is now loaded
first before everything else.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
We use easymotion primarily for vertical motion and any motion requires
at least 3 or 4 key bindings which isn't necessarily different if we are
using relative numbers. For example, pressing <Leader>j and then
pressing another one or two keys for the vertical movement is the same
number of keys while using relative numbers. So just use relative
numbers and drop it. We also never used the word and character motions
or cross window motions.
Use f,F,t,T for horizontal line motions. Use clever-f for this, which
improves the default behaviour. For any other motion not covered by
these two, just use incsearch.
While at it, move some of the key bindings to after/plugin to have
key bindings specific to a plugin in it's own file.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Also add the conflict-marker plugin. This should also be useful
for doing rebases and resolving conflicts. Might drop one later
if one of them serves all the purposes in all cases.
While at it, add unimpaired style bindings for moving between
tabs. This is required since :DiffConflictsShowHistory opens
a new tab and default tab navigation bindings gt/gT at least
are binded to something else in python.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
We do not want project specific or project local information to be
available among various neovim instances. It should either be managed
by sessions or should not be stored on neovim exit.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
vim-fugitive from Tpope is synchronous on neovim. It is
asynchronous on vim when vim-dispatch is available but for
neovim it will always be synchronous. Gina is asynchronous
by default and does not freeze on large repos like fugitive
does. So drop fugitive, other plugins and settings dependent
on it.
While at it, also add some more good things from git gutter
and some shortcuts.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
We switched away from Sonokai due to high load times in 20ms or more but
there isn't a monokai variant which is better than this. Gruvbox got
annoying after a while. A darker contrast would have been preferred but
no other fits the bill.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
It seems since we are using hard coded colors, so we do not need the
auto command at all. Getting rid of it gives the right results.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This theme is quite fast to load though slightly less nicer than
sonokai, the sonokai theme can take 20-30ms during load. Load times for
gruvbox8 seem to be around 2-2.5ms.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
LSP does not work all the time. Either client breaks, server breaks or
it does not work because of the project structure. Removing LSP for the
umpteenth time.
asyncomplete does not seem to work at all for tags. For example, in the
gst-build directory the generated tags file can be 200MB+ in size. Even
with the file size limit set to unlimited it does not seem to give any
tag suggestions at all. Same is the case for Haskell.
Mucomplete can be slow in such cases where tag file is very large or
search space is extensively large and being synchronous this is to be
expected. To alleviate this, it is necessary to have a minimum prefix
length of 2 and perhaps trigger completion only when required. However,
this was still not good enough.
We are back to deoplete with custom source configuration. It is pretty
clear vimscript solutions are not up to the mark. Enable python provider
and also reintroduce language specific solutions like racer and jedi.
Refactor out language/file type specific settings. init.vim should only
have global keybindings, plugins and plugin settings. Also some other
minor cleanups, additions and rearrangements.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Enable to process line and column jump specifications in file paths as found
in stack traces and similar output
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This setting results in the quickfix list having the same result
multiple times if by mistake we run the same search again.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
While we have fzf, for situations where we want to search and load
results in quickfix or location list vim-grepper should come in handy.
vim-qlist enchances ]i/I related bindings for search to load then in
quickfix list.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Airline section y is used for file encoding and file format. We do not
need this information in status line. Use it to show window number. Use
window numbers for navigation. See :h CTRL-W_W and :h winnr() for more
information.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
While I would ideally like to use rg, it seems any jump does or cannot
use rg for some reasons for certain languages like Haskell. This can be
seen from the language map in any jump repo. So set preferred engine as
ag for now.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
While at it, remove quick-scope as it doesn't add much of a value when
we already use easymotion. Also do some cleanup.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
The git gutter fold bindings was slowing down the easymotion h binding.
So change it. Also the any jump binding was slowing down the 'a' append
binding.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Using this setting results in floaterm changing the directory which then
does not work when working in a setup like gst-build. Stick to whatever
directory we launched from since we would have started from a version
controlled directory root in most cases.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
While this purpose can also be served by fzf the additional feature of
any-jump is that it shows definitions and usages, so helps to have more
context. Should also help us for languages we do not have any setup for
and might not want to use tags.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
We haven't used Slimux much and has not been as much useful in our
work flow. Also increases the load time.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
lessspace.vim is good but activates when leaving insert mode. This seems
to create problems while using LSP in python. Exact problem being when
in insert mode and about to enter function arguments, LSP will show
function argument signature. This conflicts with lessspace trying to do
it's thing and LSP trying to do it's thing.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This allows us to remove the various different syntax plugins we had for
each language and also takes care of most other languages if we ever
need. vim-polyglot includes the plugins we were using.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
vimtex seems to complain compiler callbacks won't work without setting
the vimtex compiler program name which is to be neovim-remote. However,
the reason for requiring neovim-remote is mentioned as neovim not
providing the --servername option which seems to be atleast not true
anymore. So remove that and disable the Python3 provider so that we do
not depend on any external providers going forward.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
vim-lsp seems to provide more options, seems to work better and faster
even perhaps. With the switch to vim-lsp and asyncomplete we should be
able to remove dependency on external python provider.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Starting a command with 'n' resulted in a poor usage experience for
jumping to 'next' match of a search. Prefix all these commands with
Leader.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
We do not do Purescript really so just add the language server support
and remove the extra bindings for purs ide plugin, if we ever require at
work.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
A plugin requiring a run of UpdateRemotePlugins does not work if it is
only setup to load with the specific file type.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
The dark black background of moonfly theme I like. So switch. Rest
seems the same as nightfly.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This theme has some better styled colors for Haskell and though
increases the load times in vim slightly seems better to use.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Neovim has a "stack" compiler file but this does not seem to work,
at least not in the shitty monorepo I am working on. Someone provided a
solution on Reddit which uses a custom compiler file and has been
modified to work on modules. Which is also perhaps why it doesn't work
in the monorepo project at work.
https://www.reddit.com/r/neovim/comments/es8wn7/haskell_makeprg_for_stack_build/https://github.com/maxigit/vimrc/tree/2020/compiler
Use them and tie it up with Neomake! change.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Using 'l' sometimes lead to false trigger as we also use it as our
primary 'Right' movement key.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Now that we use a 60% tenkeyless mechanical keyboard it is easier to
reach the ESC key and use it. Also it seems sometimes hitting jk pretty
fast to escape does not work so easily on the mechanical keyboard.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Now that we rely on Language Client, we do not need deoplete specific
completion plugins for Python or Rust.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
hasktags seems to better as it seems to be recognized by tools like
Vista and gives a proper 'Tagbar' structure for tags.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Though we had removed this earlier bring it back. It saves the hassle of
having different plugin, packages or bindings for different languages.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
It becomes extremely annoying if neomake keeps getting invoked even
before we have finished writing some sensible code and then saved the
file. So let neomake be invoked automatically only when we save a file.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
While we have gone back and forth between quickfix and fzf for cscope,
it makes sense for cscope results to be loaded in quickfix window.
Results loaded in fzf window will disappear once selected since that's
how fuzzy finding is used but we do not want to have that behaviour with
results of tools like cscope. Also use a plugin this time instead of
having our own function. The plugin also provides the added advantage of
jumping to a global definition instead of even opening that in a window.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
We may be running in a nix environment or without stack supported
project. Check this and setup the environment variable for ghcid and
hoogle plugin accordingly.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>