Giter Site home page Giter Site logo

odin-mode's Issues

How to add odin-mode with ols server lsp of Odin to EMACS with elpaca package manager in Linux.

Hello,

I would like to say here what I did in Linux (with the help of "the weak") to make this work with the elpaca package manager:

I hope that this will help others.

1º Download the OLS to the designated directory and compile it.
2º Download the odin-mode and copy to the designated directory.

3º Then in the init.el add the following:

(add-to-list 'load-path "/home/joaocarvalho/.config/emacs/elpaca/repos/odin-mode")
(add-to-list 'load-path "/home/joaocarvalho/odin/ols")

(require 'odin-mode)

; Odin
;; With odin-mode (https://github.com/mattt-b/odin-mode) and lsp-mode already added to your init.el of course!.
(setq-default lsp-auto-guess-root t) ;; if you work with Projectile/project.el this will help find the ols.json file.
(defvar lsp-language-id-configuration '((odin-mode . "odin")))


(use-package lsp-mode
  :hook ((python-mode . lsp)
         (javascript-mode . lsp)
         (odin-mode . lsp))
  :commands lsp
  :config
  (lsp-register-client
    (make-lsp-client :new-connection (lsp-stdio-connection "/home/joaocarvalho/odin/ols/ols")
                  :major-modes '(odin-mode)
                  :server-id 'ols
                  :multi-root t)) ;; This is just so lsp-mode sends the "workspaceFolders" param to the server.
  ; (setq lsp-prefer-flymake nil)) ; Or lsp-prefer-capf if you prefer LSP's completion over company-mode
) 

(use-package lsp-ui)

Best regards,

Weird indentation

I don't know exactly which one of these lines are causing it, but this part of the code:

(setq-local indent-tabs-mode t)
(setq-local tabs-width 2)

is causing some weird indentation that instead of 1 tab, it's inserting 2 tabs with 2 width each.
It's just a minor annoyance, mostly because of compatibility with other editors where it ends up having 2 tabs with 4 width each.
Is there any specific reason to have these set directly in Odin Mode? If not I have submitted a PR simply removing these lines.

Adding Tree Sitter support

Is there any way we could get an odin-ts-mode with the inclusion of native tree-sitter support from emacs 29?

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.