feat: add setup for links

This commit is contained in:
Fabio Lenherr / DashieTM 2023-01-03 01:32:42 +01:00
parent a89e285e5a
commit 584e4f31cc
4 changed files with 3 additions and 45 deletions

View file

@ -1,43 +0,0 @@
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'haskell-language-server-wrapper', '--lsp' },
filetypes = { 'haskell', 'lhaskell' },
root_dir = util.root_pattern('*.cabal', 'stack.yaml', 'cabal.project', 'package.yaml', 'hie.yaml'),
single_file_support = true,
settings = {
haskell = {
formattingProvider = 'ormolu',
},
},
lspinfo = function(cfg)
local extra = {}
local function on_stdout(_, data, _)
local version = data[1]
table.insert(extra, 'version: ' .. version)
end
local opts = {
cwd = cfg.cwd,
stdout_buffered = true,
on_stdout = on_stdout,
}
local chanid = vim.fn.jobstart({ cfg.cmd[1], '--version' }, opts)
vim.fn.jobwait { chanid }
return extra
end,
},
docs = {
description = [[
https://github.com/haskell/haskell-language-server
Haskell Language Server
]],
default_config = {
root_dir = [[root_pattern("*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml")]],
},
},
}

View file

@ -33,12 +33,12 @@ Plug("romgrk/barbar.nvim") -- bar on the top
Plug("numToStr/Comment.nvim") -- fast comments
Plug("lukas-reineke/indent-blankline.nvim") -- indicators for indentation (needs config)
Plug("lewis6991/impatient.nvim") -- speedup startup
Plug("nvim-telescope/telescope.nvim") -- file/text search
Plug("goolord/alpha-nvim") -- dashboard
Plug("lervag/vimtex") -- latex plugin
Plug("weilbith/nvim-code-action-menu") -- code action menu
Plug("rafamadriz/friendly-snippets") -- some provided snippets
Plug("p00f/nvim-ts-rainbow") -- colors brackets
Plug("nvim-telescope/telescope.nvim") -- file/text search
Plug("nvim-telescope/telescope-ui-select.nvim") -- telescope ui
Plug("nvim-telescope/telescope-file-browser.nvim") -- telescope file browser
Plug("nvim-telescope/telescope-fzy-native.nvim") -- telescope fuzzy search