Skip to content

Commit

Permalink
README: Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthi-chaud committed Nov 11, 2024
1 parent 9cd16d6 commit 0c8acac
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 2 deletions.
75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# <img alt="Icon" src="./assets/icon.png" width="75px"> Language Server for Lambdananas

This repository contains the Language Server for [Lambdananas](https://github.com/Epitech/lambdananas/), EPITECH's Haskell Coding Style Checker. It is compatible with VSCode and Neovim.

## Features

- See Lambdananas' warnings in your IDE
- Quick access to EPITECH's Coding Style Documentation

![VSCode](./assets/vscode.png)

## Installation

### 1 - Install Lambdananas

```bash
git clone [email protected]:Epitech/lambdananas.git
cd lambdananas
stack install
```

### 2 - Install the Language Server

```bash
git clone [email protected]:Arthi-chaud/lambdananas-language-server.git
cd lambdananas-language-server
stack install
```

These steps may take a while. Once installed, you can safely delete the cloned directories.

### 3 - Setup the Language Server for your IDE

#### VSCode

- Go to the Extension Tab
- Search for 'Lambdananas for VSCode'
- Click `Install`
- You're done :white_check_mark:

:point_right: Marketplace [Link](https://marketplace.visualstudio.com/items?itemName=Arthi-chaud.lambdananas-coding-style-checker)

#### Neovim

Use `nvim-lspconfig` to plug the Language Server to Neovim. In your configuration, add the following lines:

```lua
local setup_lambdananas = function()
local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")

if not configs.lambdananas then
configs.lambdananas = {
default_config = {
cmd = { "lambdananas-language-server", "." },
filetypes = { "haskell", "lhaskell" },
root_dir = lspconfig.util.root_pattern("stack.yaml", "*.cabal", "package.yaml"),
single_file_support = true,
},
}
end
lspconfig.lambdananas.setup({})
end

setup_lambdananas()
```

### How to update

- To update Lambdananas, repeat step 1.
- To update the Language Server, repeat step 2.

## Contributing

Want to contribute? Or spotted a bug? Feel free to open a [pull request](https://github.com/Arthi-chaud/lambdananas-language-server/compare) or an [issue](https://github.com/Arthi-chaud/lambdananas-language-server/issues/new) !
Binary file added assets/vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions language-server/test/assets/src/MyPutStr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module MyPutStrLn where

myPutStr = putStr

tooManyIfs :: Bool
tooManyIfs = if True then True else if False then False else True
tooManyIfs :: Int
tooManyIfs = if True then 1 else if False then 3 else 4

0 comments on commit 0c8acac

Please sign in to comment.