Browse Source

Added haskell config and ftplugin config for cpp and haskell

Alexey Dorokhov 1 year ago
parent
commit
85d177b8f0
3 changed files with 15 additions and 1 deletions
  1. 4 0
      after/ftplugin/cpp.lua
  2. 4 0
      after/ftplugin/haskell.lua
  3. 7 1
      init.lua

+ 4 - 0
after/ftplugin/cpp.lua

@@ -0,0 +1,4 @@
+vim.bo.tabstop = 2
+vim.bo.shiftwidth = 2 
+vim.bo.expandtab = true
+vim.bo.softtabstop = 2

+ 4 - 0
after/ftplugin/haskell.lua

@@ -0,0 +1,4 @@
+vim.bo.tabstop = 2
+vim.bo.shiftwidth = 2 
+vim.bo.expandtab = true
+vim.bo.softtabstop = 2

+ 7 - 1
init.lua

@@ -8,6 +8,11 @@ vim.g.neon_style = "doom"
 vim.g.mapleader = ' '
 vim.g.maplocalleader = ' '
 
+-- prepend ghcup to path
+
+vim.env.PATH =  '/home/dora/.cabal/bin:/home/dora/.ghcup/bin:' .. vim.env.PATH
+
+
 -- package manager
 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
 if not vim.loop.fs_stat(lazypath) then
@@ -193,7 +198,7 @@ require('nvim-treesitter.configs').setup {
   modules = {},
 
   -- Add languages to be installed here that you want installed for treesitter
-  ensure_installed = { 'c', 'cpp', 'go', 'glsl', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
+  ensure_installed = {'haskell', 'c', 'cpp', 'go', 'glsl', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
 
   -- Install parsers synchronously (only applied to `ensure_installed`)
   sync_install = false,
@@ -338,6 +343,7 @@ local servers = {
   gopls = {},
   pyright = {},
   rust_analyzer = {},
+	hls = {},
   -- tsserver = {},
   -- html = { filetypes = { 'html', 'twig', 'hbs'} },