Set up haskell-tools.nvim
This commit is contained in:
parent
c8d7224dc9
commit
346d1b78d9
|
@ -1,6 +1,12 @@
|
||||||
# shell containing the tools i most commonly use for haskell work!
|
# shell containing the tools i most commonly use for haskell work!
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [ ghc hpack stack cabal-install ];
|
buildInputs = with pkgs; [
|
||||||
|
ghc
|
||||||
|
hpack
|
||||||
|
stack
|
||||||
|
cabal-install
|
||||||
|
haskellPackages.implicit-hie # Automatically generate hie.yaml!
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
"library": {
|
"library": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"types": true,
|
"types": true,
|
||||||
"plugins": [
|
"plugins": true,
|
||||||
"scrap"
|
|
||||||
],
|
|
||||||
"runtime": true
|
"runtime": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"github-actions-yaml.vim": { "branch": "master", "commit": "f2f16243447cea174daa6b4a9ffd3ff9213814ef" },
|
"github-actions-yaml.vim": { "branch": "master", "commit": "f2f16243447cea174daa6b4a9ffd3ff9213814ef" },
|
||||||
"gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" },
|
"gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" },
|
||||||
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
|
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
|
||||||
|
"haskell-tools.nvim": { "branch": "master", "commit": "b19df600da8ef5fb4fb280815415ebd2a4228f0f" },
|
||||||
"hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" },
|
"hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" },
|
||||||
"hyprland-vim-syntax": { "branch": "main", "commit": "8488a24b50882da969979103b4d668c70e7995b9" },
|
"hyprland-vim-syntax": { "branch": "main", "commit": "8488a24b50882da969979103b4d668c70e7995b9" },
|
||||||
"idris2-nvim": { "branch": "main", "commit": "3a2b4d2b5ffeab9e47298456c59c31b4e1ddebc9" },
|
"idris2-nvim": { "branch": "main", "commit": "3a2b4d2b5ffeab9e47298456c59c31b4e1ddebc9" },
|
||||||
|
@ -64,7 +65,6 @@
|
||||||
"typst.vim": { "branch": "main", "commit": "6a99324a138c2da69589a8ab2e49375774e43d77" },
|
"typst.vim": { "branch": "main", "commit": "6a99324a138c2da69589a8ab2e49375774e43d77" },
|
||||||
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
|
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
|
||||||
"venn.nvim": { "branch": "main", "commit": "c114563960b8fb1197695d42798d1f3e7190b798" },
|
"venn.nvim": { "branch": "main", "commit": "c114563960b8fb1197695d42798d1f3e7190b798" },
|
||||||
"vim-abolish": { "branch": "master", "commit": "cb3dcb220262777082f63972298d57ef9e9455ec" },
|
|
||||||
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
||||||
"vim-teal": { "branch": "master", "commit": "d2aa107b257879e774680792a2aebaf9cd5742e0" },
|
"vim-teal": { "branch": "master", "commit": "d2aa107b257879e774680792a2aebaf9cd5742e0" },
|
||||||
"vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" },
|
"vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" },
|
||||||
|
|
24
dotfiles/neovim/lua/my/plugins/haskell-tools.lua
Normal file
24
dotfiles/neovim/lua/my/plugins/haskell-tools.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
local lspconfig = require("my.plugins.lspconfig")
|
||||||
|
local M = {
|
||||||
|
"mrcjkb/haskell-tools.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
version = "^2",
|
||||||
|
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
vim.g.haskell_tools = {
|
||||||
|
hls = {
|
||||||
|
on_attach = lspconfig.on_attach,
|
||||||
|
},
|
||||||
|
tools = {
|
||||||
|
hover = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -97,8 +97,10 @@ end
|
||||||
|
|
||||||
-- {{{ General server config
|
-- {{{ General server config
|
||||||
---@type lspconfig.options
|
---@type lspconfig.options
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
local servers = {
|
local servers = {
|
||||||
-- {{{ Typescript
|
-- {{{ Typescript
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
tsserver = {
|
tsserver = {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
-- We handle formatting using null-ls and prettierd
|
-- We handle formatting using null-ls and prettierd
|
||||||
|
@ -110,6 +112,7 @@ local servers = {
|
||||||
-- {{{ Purescript
|
-- {{{ Purescript
|
||||||
purescriptls = {
|
purescriptls = {
|
||||||
settings = {
|
settings = {
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
purescript = {
|
purescript = {
|
||||||
censorWarnings = { "UnusedName", "ShadowedName", "UserDefinedWarning" },
|
censorWarnings = { "UnusedName", "ShadowedName", "UserDefinedWarning" },
|
||||||
formatter = "purs-tidy",
|
formatter = "purs-tidy",
|
||||||
|
@ -117,16 +120,6 @@ local servers = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Haskell
|
|
||||||
hls = {
|
|
||||||
settings = {
|
|
||||||
haskell = {
|
|
||||||
-- set formatter
|
|
||||||
formattingProvider = "fourmolu",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Lua
|
-- {{{ Lua
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
cmd = {
|
cmd = {
|
||||||
|
@ -134,6 +127,7 @@ local servers = {
|
||||||
"--logpath=/home/adrielus/.local/share/lua-language-server/log",
|
"--logpath=/home/adrielus/.local/share/lua-language-server/log",
|
||||||
},
|
},
|
||||||
settings = {
|
settings = {
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
Lua = {
|
Lua = {
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
telemetry = {
|
telemetry = {
|
||||||
|
@ -174,10 +168,13 @@ local servers = {
|
||||||
nil_ls = {},
|
nil_ls = {},
|
||||||
nixd = {},
|
nixd = {},
|
||||||
-- }}}
|
-- }}}
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
cssls = {},
|
cssls = {},
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
jsonls = {},
|
jsonls = {},
|
||||||
dhall_lsp_server = {},
|
dhall_lsp_server = {},
|
||||||
typst_lsp = {},
|
typst_lsp = {},
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
elmls = {},
|
elmls = {},
|
||||||
-- {{{ Inactive
|
-- {{{ Inactive
|
||||||
-- pylsp = {},
|
-- pylsp = {},
|
||||||
|
|
|
@ -2,7 +2,7 @@ local env = require("my.helpers.env")
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
"L3MON4D3/LuaSnip", -- snippeting engine
|
"L3MON4D3/LuaSnip", -- snippeting engine
|
||||||
cond = env.vscode.not_active()
|
cond = env.vscode.not_active(),
|
||||||
}
|
}
|
||||||
|
|
||||||
local function reload()
|
local function reload()
|
||||||
|
|
|
@ -14,6 +14,13 @@
|
||||||
# Direnv
|
# Direnv
|
||||||
".direnv"
|
".direnv"
|
||||||
".envrc"
|
".envrc"
|
||||||
|
|
||||||
|
# Haskell
|
||||||
|
# NOTE: THIS IS A BAD IDEA
|
||||||
|
# I need to figure out a better way (this is simply here because
|
||||||
|
# a project I contribute to doesn't gitignore this file, nor does
|
||||||
|
# it have it commited).
|
||||||
|
"hie.yaml"
|
||||||
];
|
];
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
|
|
|
@ -51,6 +51,7 @@ let
|
||||||
libstdcxx5 # Required by treesitter aparently
|
libstdcxx5 # Required by treesitter aparently
|
||||||
python310Packages.jupytext # Convert between jupyter notebooks and python files
|
python310Packages.jupytext # Convert between jupyter notebooks and python files
|
||||||
graphviz # For rust crate graph
|
graphviz # For rust crate graph
|
||||||
|
haskellPackages.hoogle # For haskell search
|
||||||
|
|
||||||
# Preview
|
# Preview
|
||||||
zathura # Pdf reader
|
zathura # Pdf reader
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
let
|
let
|
||||||
blacklisted = [
|
blacklisted = [
|
||||||
"twitter.com"
|
"twitter.com"
|
||||||
"www.reddit.com"
|
# "www.reddit.com"
|
||||||
# "minesweeper.online"
|
# "minesweeper.online"
|
||||||
];
|
];
|
||||||
blacklist = lib.concatStringsSep "\n" (lib.forEach blacklisted (host: "127.0.0.1 ${host}"));
|
blacklist = lib.concatStringsSep "\n" (lib.forEach blacklisted (host: "127.0.0.1 ${host}"));
|
||||||
|
|
Loading…
Reference in a new issue