Giter Club home page Giter Club logo

fennel-language-server's Introduction

fennel-language-server

Test License: MIT

Fennel language server protocol (LSP) support.

fennel-language-server is currently in a very early stage and unreliable. Use it just for an encouraging try.

Installation

Because it is written in pure Rust language, the server should be installed via cargo.

cargo install --git https://github.com/rydesun/fennel-language-server

No demand for the Fennel environment. You don't even need Fennel runtime! (It sounds a little weird but that's the truth)

Integration

NOTE: The executable file is now named fennel-language-server. The former name fennel-ls has been abandoned.

Neovim

For Nvim user to setup fennel-language-server with nvim-lspconfig, add the following code to your configuration.

local lspconfig = require 'lspconfig'
require 'lspconfig.configs'.fennel_language_server = {
  default_config = {
    -- replace it with true path
    cmd = {'/PATH/TO/BINFILE'},
    filetypes = {'fennel'},
    single_file_support = true,
    -- source code resides in directory `fnl/`
    root_dir = lspconfig.util.root_pattern("fnl"),
    settings = {
      fennel = {
        workspace = {
          -- If you are using hotpot.nvim or aniseed,
          -- make the server aware of neovim runtime files.
          library = vim.api.nvim_list_runtime_paths(),
        },
        diagnostics = {
          globals = {'vim'},
        },
      },
    },
  },
}

lspconfig.fennel_language_server.setup{}

Status

There is a long way to go. Features are partially completed:

  • Diagnostics: Be careful these are not fully provided!
  • Goto Definition
  • Code Completion
  • References
  • Hover
  • Rename
  • Formatter

All features don't work properly on multi-symbols. It means that you cannot hover on the part after the dot, for example.

The following are also known issues:

  • Macro grammar support is very limited. You may suffer from wrong diagnostics.
  • Type checking is very weak.
  • Lack of cross-file operation. Such as require-macros still does not analyzed. You should use import-macros for a clear namespace.

Also See

XeroOl fennel-ls written in pure fennel you may love

https://git.sr.ht/~xerool/fennel-ls

fennel-language-server's People

Contributors

fedemengo avatar rydesun avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.