GithubHelp home page GithubHelp logo

catnip's People

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  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

catnip's Issues

Be able to set port for Catnip server

If someone wants to run the Catnip server in the background (as a daemon on start-up), there seems to be no way to set the port number for the Catnip server.

The current behavior is that it appears to run on random port numbers which make it impossible to configure a front-end web server proxy to forward the requests.

Non-standard ports are blocked by many firewalls so putting the Catnip server behind a web proxy allows for access via the standard HTTP port (80).

Change font.

Hi,
really compliment it is a really nice software...

Then how do you change the font ? There is any way ?
Would be nice to change only the font of catnip and keep the current setting of the browser.

We I code I love to use monospace, I really don't care what type, but it has to be monospace.

Thanks for your time...

File browser

(This is a feature request.)

A persistent file browser (optional, i.e. can be turned off or on) beside the editor pane would be awesome to have. A file browser is really useful when working on a project having many files to edit. For example, Eclipse has project-explorer/file-explorer and Emacs Dirtree provides a similar interface: http://i.imm.io/zIGR.png

Also, it would be nice to have different file types shown with corresponding 'type' icons to distinguish the files.

Catnip doesn't work with Noir out of the box (class not found)

Running lein edit on a fresh Noir project (lein new noir broken-prj; cd broken-prj; lein edit) fails with

Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        ...
        at cheshire.custom__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        ...
        at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonFactory
        ...
        at cheshire.factory__init.<clinit>(Unknown Source)

The workaround is to add an explicit dependency on cheshire 3.1.0 (that uses com.fasterxml.jackson.core/jackson-core) to the project.clj to override Noir's dependency on cheshire 3.0.0 (that claims to depend on org.codehaus.jackson/jackson-core-asl). I guess there is some conflict between what Catnip uses and what Noir uses?

Great piece of work, by the way! :-)

Versions: Lein 2, Catnip 0.4.1, Noir 1.3.0-beta3

keybinding documentation

i use emacs and i did C-k, which worked
C-y didn't work
so i'm wondering what bindings are available :)

paredit-like sexp editing in catnip, please!

When using emacs for development, the lovely paredit allows brackets to be placed and moved efficiently, and prevents para-breaking edits from happening.

http://emacswiki.org/emacs/PareditCheatsheet

I would love to see this in catnip. Catnip already supports some bracket shortcuts:

(: "" -> ()
[: "" -> []
{: "" -> {}

But paredit can do more:

alt-( : a -> (a)
ctrl-( : (a) b -> (a b)
alt-s : (a b (c)) -> a b (c)
alt-d : (a b) -> (b)
((a) b) -> (() b)

and so on.

Refresh in browser fails to re-open the current file in editor

I think it's maybe because the "" chars get replaced with "%5C", some kind of url encoding(which I know nothing aboot btw) - but not all "" get replaced, only those that would otherwise be seen in the Ctrl+F open "dialog"

The actual stacktrace seen in the repl below:

java.io.FileNotFoundException: C:\1\myp1\src%5Cmyp1%5Ccore.clj (The system cannot find the file specified)

(Unknown Source) java​.io​.FileInputStream​.open

FileInputStream.java:138 java​.io​.FileInputStream​.

io.clj:233 clojure​.java​.io​/fn

io.clj:73 clojure​.java​.io​/fn [fn]

io.clj:169 clojure​.java​.io​/fn

io.clj:73 clojure​.java​.io​/fn [fn]

io.clj:106 clojure​.java​.io​/reader

RestFn.java:410 clojure​.lang​.RestFn​.invoke

AFn.java:161 clojure​.lang​.AFn​.applyToHelper

RestFn.java:132 clojure​.lang​.RestFn​.applyTo

core.clj:603 clojure​.core​/apply

core.clj:6126 clojure​.core​/slurp

RestFn.java:410 clojure​.lang​.RestFn​.invoke

filesystem.clj:90 catnip​.filesystem​/fs​-command

server.clj:61 catnip​.server​/on​-message [fn]

server.clj:47 catnip​.server​/on​-message [fn]

core.clj:1819 clojure​.core​/binding​-conveyor​-fn [fn]

AFn.java:18 clojure​.lang​.AFn​.call

FutureTask.java:334 java​.util​.concurrent​.FutureTask​$Sync​.innerRun

FutureTask.java:166 java​.util​.concurrent​.FutureTask​.run

ThreadPoolExecutor.java:1110 java​.util​.concurrent​.ThreadPoolExecutor​.runWorker

ThreadPoolExecutor.java:603 java​.util​.concurrent​.ThreadPoolExecutor​$Worker​.run

Thread.java:722 java​.lang​.Thread​.run

Hide cheat sheet

It would be great to hide the cheat sheet.

Maybe there's a way now, but I haven't found it in the docs.

Also, if you hid the cheat sheet, it would be great to have ALL of the possible commands accessible via menus.

Great project.

Could not find artifact lein-catnip:lein-catnip:jar:0.5.0

Could not find artifact lein-catnip:lein-catnip:jar:0.5.0
This could be due to a typo in :dependencies or network issues.
Could not resolve dependencies

using lein from master, ...
at the Manual installation, I already did the profiles.clj filled with {:user {:plugins [[lein-catnip "0.5.0"]]}}
now I'm in some folder doing lein new myproject and the above is the only output.

EDIT: if I delete profiles.clj then works:

c:\1>lein new myproject
Generating a project called myproject based on the 'default' template.
To see other templates (app, lein plugin, etc), try lein help new.

EDIT2: actually I tried this profiles.clj

{:user {:plugins [[lein-swank "1.4.0"]
                  [lein-pprint "1.1.1"]]}}

and it still fails, so it must be something non-catnip related... ie. leiningen maybe doesn't ask my firewalls for inet access and fails this way

AssertionError: Assert failed: (vector? (:dependencies project []))

I'm using the latest lein from master, ie. this was last commit: technomancy/leiningen@fbc1804

Then compiled latest catnip from master using this lein, ie. last catnip commit was: 64db9c6

Then, lein new myproj somewhere.

c:\1>cd myproj

c:\1\myproj>lein edit
Exception in thread "main" java.lang.AssertionError: Assert failed: (vector? (:d
ependencies project []))
        at leinjacker.deps$add_if_missing.invoke(deps.clj:43)
        at leiningen.edit$with_catnip_dep.invoke(edit.clj:8)
        at leiningen.edit$edit.doInvoke(edit.clj:34)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at clojure.lang.Var.invoke(Var.java:415)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:603)
        at leiningen.core.main$resolve_task$fn__1605.doInvoke(main.clj:132)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:603)
        at leiningen.core.main$apply_task.invoke(main.clj:167)
        at leiningen.core.main$_main$fn__1664.invoke(main.clj:236)
        at leiningen.core.main$_main.doInvoke(main.clj:221)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.lang.Var.invoke(Var.java:415)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:601)
        at clojure.main$main_opt.invoke(main.clj:324)
        at clojure.main$main.doInvoke(main.clj:427)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at clojure.lang.Var.invoke(Var.java:423)
        at clojure.lang.AFn.applyToHelper(AFn.java:167)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
c:\1\myproj>lein -version
Leiningen 2.0.0-SNAPSHOT on Java 1.7.0_09 Java HotSpot(TM) 64-Bit Server VM

c:\1\myproj>java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

c:\1\myproj>ver

Microsoft Windows [Version 6.1.7601]

win7 64bit

actual project.clj file contents:

(defproject myproj "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]])

EDIT: projects.clj file:

 {:user {:plugins [[lein-catnip "0.6.0-SNAPSHOT"]]}}

Allow remote access to Catnip server

The Catnip server appears to use 'localhost' as the host name.

This behavior makes any reference to the server not using 'localhost' fail and makes it not possible to connect from a remote machine.

For example, if the host name is 'foobar' then the call to 'http://localhost:{catnip-listen-port}' works (if you're on the same machine as the Catnip server) but the call to 'http://foobar:{catnip-listen-port}' fails (even if you're on the same machine as the Catnip server).

Provide a menu to emulate cheat-sheet keystrokes

The cheat-sheet with keyboard shortcuts is pretty nice, but in some cases few keystrokes are captured away by the OS or other software. Please consider providing a menu to carry out the activities listed in the cheat-sheet.

location-bar should update when right-pane view navigates

When a <a> link is clicked in right pane (or other url/history setting events occur), location-bar should be updated with the new URL.

When a file is saved, the current page should be refreshed, not the stale one in the location-bar.

Allow using right pane for REPL output

Instead of showing web page in the right pane I'd like to have an option to show REPL output window there. Current REPL output window is too small (and not resizable).

Other nice-to-haves would be:

  • Allow resizing current (small) REPL window
  • Allow clearing REPL output
  • Ctrl-A and Ctrl-C (select all and copy to clipboard) should work in REPL output window

Function typechecking bug

When typechecking a function declaration, its body should be typechecked in the environment taken from the declared type.
Not doing so leads to a crash when typechecking functions with nonlocal variables
Test case: TypingExamples.e543

(doc ) not available in repl after ^S in-ns. (clojure/repl missing)

I assume this is a namespace issue, doesn't happen in emacs but does in catnip.

When I save a namespace file the minibuffer goes (in-ns) to that namespace.

After that, (doc ) and presumably other things in it's namespace are not available.

noirproject.views.svgtest» (doc)
java.lang.RuntimeException: Unable to resolve symbol: doc in this context

Between Clojure 1.2.0 and 1.3.0, (doc moved from (clojure.core/doc) to (clojure.repl/doc)

(I'm using 1.4.0 but clojuredocs doesn't know about that version).

This may be better fixed by a configuration change at my end, but it would be nice if catnip shipped with it set right, or at least with instructions in README.md on how to set it.

Running this in the repl helps:

(clojure.core/refer 'clojure.repl)

This static fix in user.clj would help

https://twitter.com/bostonaholic/status/130130333801775104

Easy to create a file which cannot be built, hard to delete

Flush with the knowledge that Clojure symbols can have '-' in them, I find myself creating file like this:

test-svg.clj

or worse

test-svg

However, Clojure's build system expects that a namespace such as:

(ns test-svg)

Will be built as test_svg.class

I suggest the following:

  1. The new filename should be taken to be the classpath class element, and the actual filename be calculated from that.

Create:
/myproj/src/views/test-svg.clj
Actually creates:
/myproj/src/views/test_svg.clj

  1. The (ns ) declaration be automatically placed at the start of the file. It's boilerplate that I don't really need to type.

Injects:
(ns myproj.src.views.test-svg)

  1. Some support of rename is added for idiots like me (so I don't have to drop to bash and then reload, losing catnip context)

Such as

3.1) Clicking on the filename in the top left corner switches to edit mode, can change filename. Auto update ns?

3.2) If a ns-declaration conflicts with the filename, the filename be changed.

For example, if I already created my file as above, and now I find I'm happy with my scribbling, I can type:

(ns myproj.src.views.test-svg)^H^H^H^H^H^H^H^H^Hsvg-view)
^S
Renames the file and builds the new class.

I know it's sugar, but I keep creating duff files. :-) Perhaps I should be the change I want to see.

([] 1) throws NPE instead of IndexOutOfBoundsException

Accessing non-existent vector element should throw IndexOutOfBoundsException but retrurns NPE instead:

java.lang.NullPointerException: null Matcher.java:1140 java​.util​.regex​.Matcher​.getTextLength Matcher.java:291 java​.util​.regex​.Matcher​.reset Matcher.java:211 java​.util​.regex​.Matcher​. Pattern.java:888 java​.util​.regex​.Pattern​.matcher core.clj:4286 clojure​.core​/re​-matcher core.clj:4338 clojure​.core​/re​-find repl.clj:87 catnip​.repl​/eval​-sexp repl.clj:96 catnip​.repl​/eval​-stream repl.clj:105 catnip​.repl​/eval​-string server.clj:47 catnip​.server​/on​-message [fn] ...

I might try to find & fix the cause if I get the time ...

Doesn't seem to work on Leiningen 2.5.1 on Java 1.8.0_40

After running lein edit I'll get the following error

$ lein edit
WARNING!!! version ranges found for:
[catnip "0.5.1"] -> [enlive "1.0.1"] -> [org.clojure/clojure "[1.2.0,)"]
Consider using [catnip "0.5.1" :exclusions [org.clojure/clojure]].

Exception in thread "main" java.lang.ExceptionInInitializerError, compiling:(/private/var/folders/df/hxtvjqmn2x36qv1vk0_j5hm80000gn/T/form-init8494194675033750760.clj:1:124)
    at clojure.lang.Compiler.load(Compiler.java:7142)
    at clojure.lang.Compiler.loadFile(Compiler.java:7086)
    at clojure.main$load_script.invoke(main.clj:274)
    at clojure.main$init_opt.invoke(main.clj:279)
    at clojure.main$initialize.invoke(main.clj:307)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.doInvoke(main.clj:420)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Caused by: java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.loadClassForName(RT.java:2093)
    at clojure.lang.RT.load(RT.java:430)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5066.invoke(core.clj:5641)
    at clojure.core$load.doInvoke(core.clj:5640)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5446)
    at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
    at clojure.core$load_lib.doInvoke(core.clj:5485)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:626)
    at clojure.core$load_libs.doInvoke(core.clj:5524)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:628)
    at clojure.core$use.doInvoke(core.clj:5618)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at cheshire.custom$loading__4784__auto__.invoke(custom.clj:1)
    at cheshire.custom__init.load(Unknown Source)
    at cheshire.custom__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.loadClassForName(RT.java:2093)
    at clojure.lang.RT.load(RT.java:430)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5066.invoke(core.clj:5641)
    at clojure.core$load.doInvoke(core.clj:5640)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5446)
    at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
    at clojure.core$load_lib.doInvoke(core.clj:5485)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:626)
    at clojure.core$load_libs.doInvoke(core.clj:5524)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:626)
    at clojure.core$require.doInvoke(core.clj:5607)
    at clojure.lang.RestFn.invoke(RestFn.java:619)
    at catnip.server$loading__4784__auto__.invoke(server.clj:5)
    at catnip.server__init.load(Unknown Source)
    at catnip.server__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.loadClassForName(RT.java:2093)
    at clojure.lang.RT.load(RT.java:430)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5066.invoke(core.clj:5641)
    at clojure.core$load.doInvoke(core.clj:5640)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5446)
    at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
    at clojure.core$load_lib.doInvoke(core.clj:5485)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:626)
    at clojure.core$load_libs.doInvoke(core.clj:5524)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:626)
    at clojure.core$require.doInvoke(core.clj:5607)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at user$eval5.invoke(form-init8494194675033750760.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6703)
    at clojure.lang.Compiler.eval(Compiler.java:6692)
    at clojure.lang.Compiler.load(Compiler.java:7130)
    ... 11 more
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.cbor.CBORFactory
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at cheshire.factory__init.__init0(Unknown Source)
    at cheshire.factory__init.<clinit>(Unknown Source)
    ... 75 more
Subprocess failed

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.