~/.config/nvim/after/ftplugin/haskell.lua fails loading ht #325
Replies: 7 comments
-
Hey 👋 Thanks for reporting. Some questions:
Cheers 😄 |
Beta Was this translation helpful? Give feedback.
-
The language server works fine without ~/.config/nvim/after/ftplugin/haskell.lua the file. If the ~/.config/nvim/after/ftplugin/haskell.lua file only has the line
the following is printed on nvim start but the sever is not started
However, if ~/.config/nvim/after/ftplugin/haskell.lua only contains
it prints the following and the server is started
The following log is from ~/.local/state/nvim/haskell-tools.log . The log ~/.local/state/nvim/lsp.log is not created when the server fails to start but is created when the sever does start.
|
Beta Was this translation helpful? Give feedback.
-
Ahh. There's an error in the readme snippet: 51250d2
|
Beta Was this translation helpful? Give feedback.
-
I am still having the same result even with that fix. It seems that lua doesn't care about the undefined variable. If the haskell.lua file is local ht = vim.print(require('haskell-tools')) it fails to load the server, but if it just vim.keymap.set('n', '<space>AAAAAAAAAAAAAAAAAAAAAAAA', vim.lsp.codelens.run, opts) With n <Space>AAAAAAAAAAAAAAAAAAAAAAAA * <Lua 105: /usr/local/share/nvim/runtime/lua/vim/lsp/codelens.lua:80>
x # * y?\V<C-R>"<CR>
Nvim builtin
o % <Plug>(MatchitOperationForward)
x % <Plug>(MatchitVisualForward)
n % <Plug>(MatchitNormalForward)
n & * :&&<CR>
Nvim builtin
x * * y/\V<C-R>"<CR>
Nvim builtin
n Y * y$
Nvim builtin
o [% <Plug>(MatchitOperationMultiBackward)
x [% <Plug>(MatchitVisualMultiBackward)
n [% <Plug>(MatchitNormalMultiBackward)
o ]% <Plug>(MatchitOperationMultiForward)
x ]% <Plug>(MatchitVisualMultiForward)
n ]% <Plug>(MatchitNormalMultiForward)
x a% <Plug>(MatchitVisualTextObject)
n ghc * <Lua 74: ~/.local/share/nvim/lazy/haskell-tools.nvim/lua/haskell-tools/repl.lua:180>
x gx <Plug>NetrwBrowseXVis
n gx <Plug>NetrwBrowseX
o g% <Plug>(MatchitOperationBackward)
x g% <Plug>(MatchitVisualBackward)
n g% <Plug>(MatchitNormalBackward)
x <Plug>NetrwBrowseXVis * :<C-U>call netrw#BrowseXVis()<CR>
n <Plug>NetrwBrowseX * :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<CR>
x <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
o <Plug>(MatchitOperationMultiForward) * :<C-U>call matchit#MultiMatch("W", "o")<CR>
o <Plug>(MatchitOperationMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "o")<CR>
x <Plug>(MatchitVisualMultiForward) * :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv``
x <Plug>(MatchitVisualMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv``
n <Plug>(MatchitNormalMultiForward) * :<C-U>call matchit#MultiMatch("W", "n")<CR>
n <Plug>(MatchitNormalMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "n")<CR>
o <Plug>(MatchitOperationBackward) * :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
o <Plug>(MatchitOperationForward) * :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
x <Plug>(MatchitVisualBackward) * :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
x <Plug>(MatchitVisualForward) * :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv``
n <Plug>(MatchitNormalBackward) * :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
n <Plug>(MatchitNormalForward) * :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
n <Plug>PlenaryTestFile * :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))<CR>
n <C-L> * <Cmd>nohlsearch|diffupdate|normal! <C-L><CR>
Nvim builtin
Press ENTER or type command to continue |
Beta Was this translation helpful? Give feedback.
-
I've found that Neovim sometimes suppresses error messages when you open a file directly. Could you please try the following:
It should print an error message if there is one. |
Beta Was this translation helpful? Give feedback.
-
Closing and moving to a discussion, as I cannot reproduce this. |
Beta Was this translation helpful? Give feedback.
-
This is a Lazy's issue. @BebeSparkelSparkel If you remove the key this should probably be added to the readme as an example configuration {
"mrcjkb/haskell-tools.nvim",
version = "^3", -- Recommended
lazy = false,
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Neovim version (nvim -v)
v0.9.1
Operating system/version
OpenBSD 7.4
Output of :checkhealth haskell-tools
How to reproduce the issue
nvim src/*.hs
Expected behaviour
I expected the language server to start and have the key maps defined.
Actual behaviour
The language server does not start and the key maps specified in ~/.config/nvim/after/ftplugin/haskell.lua are not defined.
It seems that the
require('haskell-tools')
fails.Log files
No response
The minimal config used to reproduce this issue.
~/.config/nvim/init.lua
~/.config/nvim/after/ftplugin/haskell.lua
Beta Was this translation helpful? Give feedback.
All reactions