Giter VIP home page Giter VIP logo

clojure-sublimed's Introduction

Here are a few projects I worked on.

Fonts:

Apps:

  • AnyBar: universal macOS menubar status indicator

Java libraries:

  • Skija: Bindings for Skia, a graphics library
  • JWM: Cross-platform window management

Clojure libraries:

Sublime Text:

  • Clojure Sublimed: Clojure support for Sublime Text 4
  • Executor: Run any executable from your working dir in Sublime Text
  • Writer: Color scheme for focused long-form writing

Alabaster, a Minimalist Color Scheme:

Keyboard layouts:

  • Universal: EN/RU reimagined to be used together

clojure-sublimed's People

Contributors

dosbol avatar einars avatar igoradamenko avatar jaihindhreddy avatar jpe90 avatar kgoh avatar tamwahba avatar tonsky avatar wundervaflja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clojure-sublimed's Issues

Region returns on Undo

  • Ctrl+I on a region
  • Edit inside it
  • Cmd+Z

Expected: text returns, region does not
Actual: both text and region return. Region could not be removed anymore

Screen.Recording.2021-10-26.at.01.39.16.mov

Eval results competing space with Clojure LSP

Hello, I know this is not an issue of Clojure Sublimed per see, but I couldn't find any help for this anywhere else, so I'll try to get some light here.

I'm playing with Clojure Sublime + LSP, the problem is that the LSP thing on Sublime puts an annotation to show the code actions always in the right side, for example:

Screen Shot 2022-02-17 at 15 09 01

The result is that when I evaluate a line, it doesn't show anything on the right side. It actually does show, but it places it in a line after the LSP annotation, making it not visible... unless I hover with the mouse, like:

Screen Shot 2022-02-17 at 15 09 57

The question is, how can I disable the LSP annotation on the right, so I can have just the Clojure Sublime evaluation there? (I still want to use code actions, but I have a dedicated shortcut for it, I just want to get rid of the annotation on the side).

Syntax highlighting appears worse with Clojure Sublimed?

Hi I'm using

"color_scheme": "Monokai.sublime-color-scheme",

Clojure Sublimed
Screenshot 2022-01-21 at 10 31 17
In-built Clojure
Screenshot 2022-01-21 at 10 31 28

Sorry I don't have more concrete description of the problem but does this look "correct"?

edit: the file I'm looking at is a .cljc file but this obviously reframe stuff here, I've tested with .clj files too and they have the same "problem"

Toggle pretty print successful eval result under the code

When standing inside successful evaluation, Ctrl+I should toggle between compact one-line truncated view (first) and expanded pretty-printed view (second):

Screenshot 2021-10-26 at 01 11 58

Note: do not use clojure.pprint, better implement it yourself: same idea, but sans the part where it tries to fit keys/values into 80 chars

Clojure-Sublimed syntax breaks go-to definition of namespaced functions

With the default Clojure syntax, go-to definition works with namespaced functions within the project. When using Clojure-Sublimed, this no longer works.

Below shows go-to definition working with default syntax on the right, not working with Clojure-Sublimed on the left, and then working in Clojure-Sublimed when the namespace is removed.

Screen.Recording.2022-02-03.at.9.46.59.AM.mov

Can't evaluate when file require libs

If i evaluate a file thats requires any lib, it returns a java.io.FileNotFoundException. This is the test script i'm using:

(ns clj-init.core
(:require [java-time :as t]))

(defn test-01
[]
(println (t/local-date-time)))

and this is the exception it returns:

java.io.FileNotFoundException: Could not locate java_time__init.class, java_time.clj or java_time.cljc on classpath. Please check that namespaces with dashes use underscores in the

It works just fine if i run it on lein repl or Intellij Cursive

Does someone have any ideia on how can i fix it?

Measure elasped time in the middleware

Time reported now is measured in python client, which includes overhead for creating session, client-server communication and serialization. Most times you are interested in your code performance, though.

This is way too off:

Screenshot 2021-10-26 at 01 23 30

Recommended set up to make static analysis autocomplete work?

" Autocomplete. Static analysis is much simpler and much more reliable than requiring an always-live connection to the working app."

What sublime package provides autocomplete for Clojure. Have been searching for something and have not been able to find anything.

Open to suggestions/recommendations.

Unbounded number of threads in nREPL server

We clone the session on each eval, but never close the created sessions. This means that the total number of sessions in the nREPL server continues to rise. This is unnecessary inefficiency.

Related to #20.

Option to disable cloning session before eval

Right now on each eval we clone session. This enables parallel evaluation, but disables modifying thread-local vars (set! etc).

Some people might not like it, so might be a good idea to being able to turn it off

SublimeREPL integration

Hey Nikita!

I'm rolling into Clojure and setting up dev env, and I've heard in your talk on Clojure/north in Toronto the story about this package. That's why I've installed it. But SublimeREPL doesn't work with it by default. It runs lein repl in background, opens new tab for *REPL* [clojure], however when I send any selected code there it says it can't find a REPL for clojurec.

I've fixed this by defining user configs for Sublime REPL inside ~/Library/Application Support/Sublime Text 3/Packages/User/SublimeREPL/config/Clojure. I've added Main.sublime-menu:

[
     {
        "id": "tools",
        "children":
        [{
            "caption": "SublimeREPL",
            "mnemonic": "R",
            "id": "SublimeREPL",
            "children":
            [
                {"caption": "Clojure",
                 "id": "Clojure",
                 "children":[
                    {"command": "repl_open", 
                     "caption": "ClojureC",
                     "id": "repl_clojurec",
                     "args": {
                        "type": "subprocess",
                        "encoding": "utf8",
                        "cmd": {"windows": ["lein.bat", "repl"],
                                "linux": ["lein", "repl"],
                                "osx":  ["lein", "repl"]},
                        "soft_quit": "\n(. System exit 0)\n",
                        "cwd": {"windows":"c:/Clojure",
                                "linux": "$file_path",
                                "osx": "$file_path"},
                        "syntax": "Packages/sublime-clojure/ClojureC.tmLanguage",
                        "external_id": "clojurec",
                        "extend_env": {"INSIDE_EMACS": "1"}
                        }
                    }]
                }
            ]   
        }]
    }
]

And Default.sublime-commands:

[
    {
        "caption": "SublimeREPL: ClojureC",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_clojurec",
            "file": "config/Clojure/Main.sublime-menu"
        }
    },
]

They defines new REPL as clojurec and also applies sublime-clojure to it.

Now REPL for ClojureC is available in menu:

Captura de pantalla 2019-09-16 a las 16 48 27

And I've checked the syntax highlighting by testing it with the one of the strings from your testing files. Before:

Captura de pantalla 2019-09-16 a las 16 39 55

Now:

Captura de pantalla 2019-09-16 a las 16 39 28

And of course everything works properly with sending selected code into REPL.

I'm not sure whether it's a big deal or not, because I haven't had any Clojure experience yet, but when I googled plugins for REPL I got an impression that this one is the most popular for this purpose. So maybe you need to improve the docs by adding Troubleshooting section.

Keystroke for REPL connect that includes port auto-detection?

I enabled the following keystroke, and while it works, the port auto-detection logic doesn't seem to fire so I have to manually type the port into the little command window that pops up. Is it possible to fire the command from a keystroke, but have it auto-detect the port number, as happens when this command is run manually via the command palette?

In my user keymap file:

    {"keys": ["ctrl+j"],
     "command": "sublime_clojure_connect"},

Getting stuck on "adding middlewares"

I'm attempting to connect to a server hosted by Shadow-CLJS:

{:deps        {:aliases [:common]}
 :nrepl       {:port       5555
               :middleware []}
 …}

There are no error messages in the log, as I can see.

Screenshot 2021-12-14 at 10 54 57

Command to require namespace

When standing on a symbol, run a command that will require it as a namespace. Seems something like (clojure.pprint/pprint :abc) doesn’t work simply because clojure.pprint has not been required

When sending code from file, ns might not be defined yet

E.g. start REPL and try to eval plus form in a file like this:

(ns abc)

(+ 1 2)

Command send to nREPL will have {"ns": "abc"}, but abc has not been evaluated yet so it doesn’t exist. This causes an error, even though code could be evaluated just fine in user namespace. Or, alternatively, abc might be required first, before evaluation.

Evaluating without selection doesn't evaluate topmost form

I'm new to clojure, sorry if this is a misguided question.

The basic "Clojure REPL: Evaluate" command seems to try to evaluate only the character at my cursor, not the top most form. Any idea what is wrong with my setup, or if this is some kind of bug?

With my cursor between ( and + I get this result:
image

With the entire line selected, I get 2

Trouble following installation instructions

➜  ~ cd Projects
➜  Projects git clone https://github.com/tonsky/sublime-clojure.git
Cloning into 'sublime-clojure'...
remote: Enumerating objects: 327, done.
remote: Counting objects: 100% (258/258), done.
remote: Compressing objects: 100% (183/183), done.
remote: Total 327 (delta 148), reused 173 (delta 69), pack-reused 69
Receiving objects: 100% (327/327), 1.49 MiB | 186.00 KiB/s, done.
Resolving deltas: 100% (183/183), done.
➜  Projects ln -s `pwd`/sublime-clojure ~/Library/Application\ Support/Sublime\ Text/Packages/Clojure\ Sublimed
ln: /Users/petrus/Library/Application Support/Sublime Text/Packages/Clojure Sublimed: No such file or directory

Parenthesis character literal is treated like list

I don't know if this is the result of using alabaster, but given issues here and there, it may be coming from how Clojure Sublimed treats parentheses.

When using Clojure's character literal, it's displayed correctly for most characters. For lists, however, it seems to treat the parenthesis like a character and part of the form. For example, the following code prints Klay (#3), but highlights the character literal as part of the str form.

(def name "Klay")
(def lb-pos 3)
(println (str name " (#" lb-pos \)))

Screen Shot 2022-02-12 at 7 14 51 PM

It doesn't mess with the second to last parenthesis, but it's still unpleasant to see, especially when used in long, complicated forms where a single one of these can completely change the meaning for a reader.

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.