Skip to content

Commit

Permalink
fix: hls using nix flake; hover diagnosic
Browse files Browse the repository at this point in the history
  • Loading branch information
solidsnakedev committed Dec 19, 2024
1 parent 7fc0287 commit ff2f103
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ vim.opt.cursorline = true -- Highlight cursor line
vim.opt.shiftwidth = 2 -- Set shift width to 2 spaces
vim.opt.tabstop = 2 -- Set tab width to 2 columns
vim.opt.expandtab = true -- Use spaces instead of tabs
vim.opt.scrolloff = 10 -- Do not scroll below/above N lines
vim.opt.scrolloff = 20 -- Do not scroll below/above N lines
vim.opt.wrap = false -- Do not wrap lines
vim.opt.incsearch = true -- Highlight matches as you type
vim.opt.ignorecase = true -- Ignore case in searches
Expand Down Expand Up @@ -65,6 +65,8 @@ map('n', '<S-Up>', 'yyddkP')
map('n', '<S-Down>', 'yyddp')
nmap('<Leader>h', ':nohl<cr>') -- Toggle highlight search

-- Show all diagnostics on current line in floating window
nmap("<Leader>d", ":lua vim.diagnostic.open_float()<cr>")
nmap("<leader>n", ":Neotree toggle reveal<cr>")
nmap("<leader>gg", ":LazyGit<cr>")
nmap("<leader>ff", ":Telescope find_files<cr>")
Expand Down Expand Up @@ -129,3 +131,9 @@ require('dashboard').setup({
},
},
})

require('lspconfig').hls.setup {
cmd = (vim.fn.executable('haskell-language-server-wrapper') == 1 and { 'haskell-language-server-wrapper', '--lsp' })
or (vim.fn.executable('haskell-language-server') == 1 and { 'haskell-language-server', '--lsp' })
or nil,
}
5 changes: 5 additions & 0 deletions modules/nixvim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ in
# Create aliases for Vi and Vim commands
viAlias = true;
vimAlias = true;
diagnostics = {
virtual_text = false;
float = { border = "rounded"; };
};

# Color Scheme
# Use Catppuccin color scheme
Expand Down Expand Up @@ -125,6 +129,7 @@ in
hls = {
enable = true;
installGhc = false;
package = null;
};
# TypeScript language server
ts_ls.enable = true;
Expand Down

0 comments on commit ff2f103

Please sign in to comment.