GithubHelp home page GithubHelp logo

thefrontside / frontmacs Goto Github PK

View Code? Open in Web Editor NEW
500.0 28.0 22.0 2.31 MB

Package-based, web-centric, customizable, awesome-by-default, acceptance-tested Emacs distribution

License: MIT License

Emacs Lisp 99.92% JavaScript 0.04% TypeScript 0.05%
emacs emacs-configuration emacs-add-on emacs-packages emacs-customizations emacs-initialization starterkit

frontmacs's Introduction

Frontmacs

Build Status Chat on Discord Created by Frontside

A collection Emacs Packages maintained by your friends at Frontside.

frontside-javascript

MELPA

JS development that just works™️

Modern JavaScript development is so much more than just syntax highlighting, or even a language server. This package make sure that your JavaScript environment works "out of the box". This means:

  • JavaScript, TypeScript, plus support for JSX, TSX, and MDX
  • Code navigation and refactoring
  • Support for NodeJS and executables in node_modules
  • Automatically setup error highlighting with project-local tools like ESLint and Prettier.

Currently, frontside-javascript uses tide-mode for TypeScript and language server support. Like that project, we have our eye on LSP-mode, and when it's ready will migrate to use that system instead. For the time-being however, we've found tide to be the more consistently reliable alternative.

Usage

Install the frontside-javascript and add a call to (frontside-javascript) somewhere in your init process. For example with use-package:

(use-package frontside-javascript
  :init (frontside-javascript))

frontmacs's People

Contributors

cowboyd avatar craiglyons avatar dragon788 avatar flexyford avatar lionyxml avatar robdel12 avatar taras avatar wwilsman 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frontmacs's Issues

What does this repo do?

Your README answers the question "Why did we make our own?"

While this might the question you are most interested in answering, the rest of the internet is probably most interested in the answer to "why would I use this?" and specifically, "how would this repository help me achieve my own goals?".

It'd be great if it the README could go some way towards convincing me, otherwise I'll just close the tab and get back to work ;-)

add use-package as a dependency

Whenever you want to fiddle around with experimental packages in your initializers, you want use-package It should be installed out of the box so that we can use it.

Spacemacs layer or package

How this repo is related with Spacemacs?
Can I use Frontmacs with Spacemacs?
For example, can I install Frontmacs as Spacemacs layer or package?

Bootstrap script

When setting up Frontmacs for the first time, we need a way to install the basic init.el script that just copies it from github over to the home directory. Otherwise it's a pain to cut and paste from the README.

If it finds an existing emacs configuration, it can move it to a backup location.

$ curl https://raw.githubusercontent.com/thefrontside/frontmacs/bootstrap | sh
Existing .emacs.d found, moving it to .emacs.d.backup
Done.

Install error

Hi
When I try to launch emacs I have this error
image
ideas ?

Use ws-trim for whitespace

This package isn't on melpa but we should either include it here or add it to melpa. Then add it to frontmacs

Evergreen Frontmacs

When a new version of frontmacs comes out, users should be made aware that it's out. Also, the upgrade process should be as smooth as possible:

  • prompt to update frontmacs, or wait until later
  • show release notes in the dialog prompt.
  • update frontmacs, and then restart emacs
  • remove all stale .elc files.

Usage Guide

There's now a bunch of functionality bundled with frontmacs, but only tribal documenation beyond the actual install process. The readme should at least help people discover which pieces of functionality there are.

  • key bindings
  • frontmacs utilities
  • configuration options.

add rspec-mode

I went to edit an rspec today, and my usual command for running a focused test wasn't there!

Maybe add a warning that about calling save-buffe on traditionally safe buffer events?

You might want to warn people that this enables auto-saving buffers on many buffer/frame events that are usually considered safe.

https://github.com/thefrontside/frontmacs/blob/master/frontmacs-editing.el#L128

(defadvice switch-to-buffer (before save-buffer-now activate)
  (when buffer-file-name (save-buffer)))

; the same defadvice is applied to:
;    other-window
;    windmove-{up,down,left,right}

This absolutely needs a warning.

(add-hook 'focus-out-hook
          (lambda () (when buffer-file-name
                       (save-buffer))))

Also, maybe this should only happen to buffers that are already backed up in the VCS? Saving unknown changes back to the original file whenever the frame looses focus - which can happen due to external, unpredictable events - seems like an accident waiting to happen.

Spell check error

Under Customizable section of README.md: esilp should be elisp or more specifically Emacs Lisp.

Definition of fringe-bitmap might have problems in mixed TTY/GUI sessions

This part of frontmacs-editing.el:

  ;; make the flycheck arrow look like an exclamation point.
  ;; but only do it when emacs runs in a window, not terminal
  (when window-system
    (define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow
        [0 24 24 24 24 24 24 0 0 24 24 0 0 0 0 0 0]))

is wrong: window-system is a global variable, whereas being on a text-mode terminal is a frame-specific attribute. A single Emacs session can have both GUI and TTY frames at the same time.

Syntax highlighting for comments in JS.

When you have a multi line comment in JS opening it with /* works but if you have two asterisk it breaks /**. However i think it should still work.

Works:

/*
* some awesome multiline comment
* opening with one asterisks
*/

screen shot 2017-04-26 at 12 55 19 am

Does not work:

/**
* another sweet multiline comment
* opening with two asterisks
*/

screen shot 2017-04-26 at 12 54 53 am

counsel-projectile-on

When I open emacs I encounter the following warning:

Warning (initialization): An error occurred while loading ‘/home/gburnett/.emacs.d/init.el’:

Symbol's function definition is void: counsel-projectile-on

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

I follow the debugging advice

Debugger entered--Lisp error: (void-function counsel-projectile-on)
  counsel-projectile-on()
  byte-code("\306\307!\210\306\310!\210\306\311!\210\306\312!\210\306\313!\210\314\315!\210\316�\317 \210\320�\321�\322�\323�\324�\325\315!\210\326\327!\207" [projectile-completion-system ivy-re-builders-alist company-idle-delay company-tooltip-limit company-minimum-prefix-length company-tooltip-flip-when-above require swiper company counsel-projectile flx smex ivy-mode 1 ivy counsel-projectile-on ((swiper . ivy--regex-plus) (t . ivy--regex-fuzzy)) 0.5 10 2 t global-company-mode provide frontmacs-completion] 2)
  require(frontmacs-completion)
  eval-buffer(#<buffer  *load*-331489> nil "/home/gburnett/.emacs.d/elpa/frontmacs-0.2.16/frontmacs.el" nil t)  ; Reading at buffer position 231
  load-with-code-conversion("/home/gburnett/.emacs.d/elpa/frontmacs-0.2.16/frontmacs.el" "/home/gburnett/.emacs.d/elpa/frontmacs-0.2.16/frontmacs.el" nil t)
  require(frontmacs)
  eval-buffer(#<buffer  *load*-238261> nil "/home/gburnett/.emacs.d/init-frontmacs.el" nil t)  ; Reading at buffer position 2576
  load-with-code-conversion("/home/gburnett/.emacs.d/init-frontmacs.el" "/home/gburnett/.emacs.d/init-frontmacs.el" nil nil)
  load("/home/gburnett/.emacs.d/init-frontmacs.el")
  eval-buffer(#<buffer  *load*> nil "/home/gburnett/.emacs.d/init.el" nil t)  ; Reading at buffer position 361
  load-with-code-conversion("/home/gburnett/.emacs.d/init.el" "/home/gburnett/.emacs.d/init.el" t t)
  load("/home/gburnett/.emacs.d/init" t t)
  #[0 "�\205\266�	\306=\203��\307�\310Q\202?�	\311=\204��\307�\312Q\202?�\313\307\314\315#\203*�\316\202?�\313\307\314\317#\203>�\320\321\322!D\nB�\323\202?�\316\324�\325�\324\211#\210�\324=\203e�\326\327\330\307�\331Q!\"\325�\324\211#\210�\324=\203d���\210�\203\247�\332�!\333\232\203\247�\334�!\211\335P\336�!\203\201�\211\202\214�\336�!\203\213��\202\214�\314\262��\203\245�\337��\"\203\243�\340\341��#\210\342\343!\210��\266�\f?\205\264�\314�\325\344\324\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7]()
  command-line()
  normal-top-level()

When I look at line 27 of frontmacs-completion.el I see that counsel-projectile-on is used. According to the counsel-projectile documentation it no longer exists.

Should this use counsel-projectile-mode instead?

Key Binding Guide

Part of #63

We use a lot of packages in frontmacs, and bind a bunch of custom keys. It's too bad that someone coming in not knowing anything would be completely lost. For all our custom keys, and for those that are really super handy that we bind by default, we should explain

  1. the pnemonic strategy (i.e. the C-c p prefix stands for project)
  2. the binding
  3. links out to external reading resources if necessary.

Consider rename?

"frontmacs" doesn't roll off the tongue and it's a lot to type inside function and file prefixes again and again and again. I was thinking about fmax as a name because it scores better on the scale of both shorter and cooler.

Is there Flowtype support ?

Hi

I've installed a vanilla version of frontmacs. When opening a file with flow-type annotations, the syntax highlighing is broken and there are flycheck error. Is it something that can be configured otherwise ?

Thanks

Node stacktrace regexp does not match syntax errors

node -r @std/esm play.mjs
/Users/cowboyd/Code/microstates.js/play.mjs:70
  options = M.Array
          ^

SyntaxError: Unexpected token
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Our regexp is currently only looking for lines that start with at, so it misses the syntax error completely.

install can't reach elpa.frontside.io

I tried to install frontmacs by just adding the line from the readme to my ~/.emacs, when starting emacs i get this error:

Debugger entered--Lisp error: (gnutls-error #<process elpa.frontside.io> -12)
  signal(gnutls-error (#<process elpa.frontside.io> -12))
  gnutls-negotiate(:process #<process elpa.frontside.io> :type gnutls-x509pki :hostname "elpa.frontside.io")
[...]

looks to me, that the host elpa.frontside.io is not reachable, pinging it gives me 100% packet loss.

Here is my ~/.emacs:

;; boot frontmacs
(load (expand-file-name "~/.emacs.d/init-frontmacs.el" ))                                                                              

and the init-frontmacs.el is at the right place.

install error

Hi, I followed the instruction and get this error when launching emacs:

image

I'm using ubuntu 16.04
Any help would be much appreciated, thanks

goto line

Need to bind goto-line It was M-g M-g on the old system.

Gracefully Error out if Version of Emacs is not supported

If trying to start on a previous version of Emacs, it get a not-so-nice error like this one #100

There's no way to tell between frontmacs being broken and trying to run it on an unsupported platform.

Instead, it should log something to the console like

Oops, Frontmacs only supports Emacs >25 and you're running version X. You can look into upgrading emacs here. here and here...

Compilation regexp for node does not match on `.mjs`

-*- mode: compilation; default-directory: "~/Code/microstates.js/" -*-
Compilation started at Fri Dec  1 11:35:55

node -r @std/esm play.mjs
ms.toggle().valueOf() =  false
ReferenceError: DoneAndDone is not defined
    at /Users/cowboyd/Code/microstates.js/play.mjs:17:21
    at Object.<anonymous> (/Users/cowboyd/Code/microstates.js/play.mjs)
    at Module._compile (module.js:612:30)

Compilation exited abnormally with code 1 at Fri Dec  1 11:35:56

which-key support

Without it new programmers will not be attracted to do stuff using keys

Autoupdate

  • updates installed packages when you start emacs
  • shows a message in the minibuffer, the last message that says which packages were upgraded
  • configuration option for update check interval.
  • config option to turn off.

nlinum over linum

linum is very slow and since it redraws in each key press, which gives terrible flickes.

but similar look can be achived using nlinum

screenshot_2018-01-07_23-32-31

     (require 'nlinum)

     (setq nlinum-delay t) ;; for smooth scrolling
     (setq nlinum-highlight-current-line t)
     (setq nlinum-format " %3d ")
     (nlinum-current-line "#your-fav-color") ;; in screen shot its *inverse-video* 

only downside is you hlinum might not work with nlinum, I haven't checked.

Keybinding for exchanging windows

There is a handy function where you can switch the place of your windows. So if you have the editor split two ways, and you want to swap the position of the buffers, you can do so with a simple command as opposed to executing like 4 different keystrokes. Here's the awkward way:

2017-04-10 09 49 22

Crux, on which we already depend, has a function called crux-swap-windows and I believe it was bound to C-c s on our old configuration.

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.