Closed mrcjkb closed 1 year ago
@Br3akp01nt could you please give this a try with the 172-windows-support
branch?
To enable debug logging at startup of the plugin, you can add the following to your config:
local ht = require('haskell-tools')
ht.setup {
tools = { -- haskell-tools options
log = {
level = vim.log.levels.DEBUG,
},
},
hls = {
-- your regular config
},
}
Once the issue has been resolved, I would disable it again, as it could impact performance.
setup
is meant to be called somewhere in your config, e.g. with packer:
packer.startup(function(use)
use('wbthomason/packer.nvim')
use {
'mrcjkb/haskell-tools.nvim',
requires = {
'nvim-lua/plenary.nvim'
},
config = function()
local ht = require('haskell-tools')
ht.setup {
-- CONFIGS HERE
}
end,
}
end
)
setup_or_attach
is supposed to go in ftplugin/haskell.lua
(choose between one of them though - don't call both).
I prefer setup_or_attach
, because it doesn't impact startup when I'm not working with Haskell files.
But I don't know how to do that in Windows.
Hey, that seems to have done the trick! It's no longer freezing, and I'm getting hls in the editor. The call to set the logging level still seems to produce nil errors, but the hls log is now properly populated with logging entries. Thanks a lot! Let me know if you need me to try anything else.
Great to hear :tada:
Thanks for testing! :pray:
I'll publish a new release.
Regarding the nil
errors:
As for logging, I tried ht.log.set_level(vim.log.levels.DEBUG) but received nil error on vim.log. Running it manually in nvim :lua require('haskell-tools').log.set_level(vim.log.levels.DEBUG) seems to have run successfully,
The examples in the readme assume you have set ht = require('haskell-tools')
. Otherwise, ht
will be nil
.
ht.log
will be nil
until either setup
or setup_or_attach
has been called.
@all-contributors please add @Br3akp01nt for userTesting
@mrcjkb
I've put up a pull request to add @Br3akp01nt! :tada:
@all-contributors please add @Br3akp01nt for bug
@mrcjkb
I've put up a pull request to add @Br3akp01nt! :tada:
@Br3akp01nt please don't hesitate to open an issue if you run into other problems - although I might be a bit slow to fix them if I can't reproduce them on Linux.
I do expect some features (like fast-tags
integration and the ghci
repl) not to work properly on Windows.
And of course, I will also gladly accept contributions that improve support for non-unix-like OSs :wink:
Discussed in https://github.com/mrcjkb/haskell-tools.nvim/discussions/171