Commit graph

8 commits

Author SHA1 Message Date
Sanchayan Maity 682c735651 nvim: after: ftplugin: Clean up Haskell 2020-09-24 17:00:06 +05:30
Sanchayan Maity 9fe8808e7e nvim: ftplugin: haskell: Assume hasktags & hlint are available in path
We assume these are installed via nix and available globally. hasktags
and haskdogs do not build with stack on ghc8.8 and hence this switch.
With nix, haskdogs gives an issue due to locale like is also observed
when stack is installed via nix. codex does not seem to generate tags
which work.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-07-11 13:12:39 +05:30
Sanchayan Maity f40584b6a9 nvim: Enable LSP support for Haskell
With ghcide release v0.2.0 adding multi-component support this should
work more widely now. We still can have tags, so change the key binding
for jump to definition and drop key binding K for Hoogle.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-06-03 12:35:15 +05:30
Sanchayan Maity a11a6d3ba2 nvim: after: ftplugin: haskell: Add a asyncdo mapping for hlint
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-05-22 17:55:00 +05:30
Sanchayan Maity 467a660409 nvim: Drop neomake, QFGrep and vim-grepper
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>
2020-05-21 16:39:06 +05:30
Sanchayan Maity fee71ae71e nvim: Miscellaneous clean up
Make sure key bindings are local to the file type buffer.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-05-09 19:17:58 +05:30
Sanchayan Maity 55d3655ffe nvim: ftplugin: haskell: Enable classic highlighting for Haskell
Gives color separation in molokai between "instance" and "Typeclass Type".

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-04-30 10:29:24 +05:30
Sanchayan Maity 932e3ffc42 nvim: LSP cleanup and refactor
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>
2020-04-15 09:27:36 +05:30