Created
January 9, 2022 16:26
-
-
Save Gabriella439/8cd898bc7f3d83b28db0ee6e12cc4431 to your computer and use it in GitHub Desktop.
First draft of init.vim for haskell-language-server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin() | |
Plug 'neovim/nvim-lspconfig' | |
call plug#end() | |
lua << EOF | |
require('lspconfig').hls.setup({ | |
settings = { | |
haskell = { | |
formattingProvider = 'stylish-haskell', | |
}, | |
}, | |
on_attach = function(client) | |
vim.api.nvim_buf_set_keymap(0, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', {noremap = true}) | |
vim.api.nvim_buf_set_keymap(0, 'n', '<C-n>', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', {noremap = true}) | |
vim.api.nvim_buf_set_keymap(0, 'n', '<C-p>', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', {noremap = true}) | |
vim.api.nvim_buf_set_option(0, 'omnifunc', 'v:lua.vim.lsp.omnifunc') | |
vim.api.nvim_buf_set_option(0, 'tagfunc', 'v:lua.vim.lsp.tagfunc') | |
end, | |
}) | |
EOF | |
:set nohlsearch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment