Git Product home page Git Product logo

vim-racket's People

Contributors

alchemicalhydra avatar averms avatar bbraithwaite avatar benknoble avatar bruce-hill avatar ckuhl avatar dalev avatar danielepiccone avatar dkearns avatar equaa avatar ffledgling avatar goffrie avatar jimrhoskins avatar jubnzv avatar justuswilhelm avatar langston-barrett avatar lnl7 avatar m-pilia avatar melver avatar nathanpc avatar purplemyst avatar rodrigosetti avatar sabauma avatar takikawa avatar thepaul avatar tov avatar wlangstroth avatar yuhta 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

vim-racket's Issues

Inclusion in the distributed Vim runtime

Would it be possible to send this to Bram for inclusion in the distributed Vim runtime?

It's a much nicer experience for the casual Racketeer if this support is available out of the box. It's also a bit strange having a Racket interface (:help mzscheme) but no default runtime support.

It doesn't have to be kept in sync with all changes here if that is a maintenance burden. What we do with vim-ruby, for example, is generally just submit a copy before the next major Vim release unless there's been a significant bug fix or feature enhancement. That way casual users get a good experience and serious users know to install from the Github repo if they want to use the very latest version.

Thanks,
Doug

How is detecting filetype from #lang useful?

Since #47 it tries to set the filetype to whatever set in #lang. What's the purpose for this?

E.g. one could define a module like #lang sicp, but vim doesn't have any language support for filetype=sicp.

No licence for the plugin

Currently there's no licence for the plugin.

This isn't a huge issue but it would be nice to know that it's okay to fork it.

vim-racket conflicting with SLIMV

I have both Slimv and this plugin loaded and I'm getting the following on various occasions (paredit wrap, completion etc.)

Error detected while processing function PareditWrap..<SNR>60_SetKeyword:
line    3:
E474: Invalid argument: iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94,~,#,|,&
Press ENTER or type command to continue

The core of the problem is Invalid argument: iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94,~,#,|,& -- that's always present in the error message. Can this be fixed or worked around? (I feel like getting rid of Slimv is not an option for me)

vim-racket interacts poorly with syntastic

(Don't know if I should file a bug at syntastic instead.) When I have both syntastic and vim-racket in my bundle directory (vanilla install, no extra .vimrc configuration besides pathogen infect), running ':w' on even a small Racket file, e.g.

#lang racket
(require redex)

results in vim hanging for a few seconds. I don't really know how you'd go about debugging this, but removing either syntastic or vim-racket resolves the problem.

Syntax highlighting breaks on type conversions

Despite type conversions such as path->string being in the racket.vim syntax file, they are not highlighted properly in Vim. Is this an inherent limitation of Vim's syntax highlighting, or could it be fixed?

vim-plug support?

Hi, is there a plan for vim-plug support? Or how to let it work with vim-plug?

Add Vim commands for running/building

One feature that was pretty handy in fatih/vim-go was the ability to use shorthand's such as :GoBuild, and I've been playing around with doing this for Racket:

command! -nargs=* RktDocs :silent execute "!raco docs" '<args>' | redraw!
command! RktExe  execute "!raco exe -v %"
command! RktREPL execute "!racket -il xrepl"
command! RktMake execute "!raco make -j $(grep -c ^processor /proc/cpuinfo) -v %"
command! RktRun  execute "!racket %"

I suppose this really doesn't shorten the total number of characters someone would need to type all that much, though personally I find this more convenient than using :!racket -il xrepl directly. Any chance of something like this being added to ftplugin/racket.vim?

Edit: Updated :RktMake to count the total CPU cores, and it might be the best use-case for these shorthand's I've presented.

Edit2: Additionally, I've added a dirty method of using raco docs <desired search term> to lookup a command:

command! -nargs=* RktDocs :silent execute "!raco docs" '<args>' | redraw!

The built-in method of using K seems to only work with racket man pages being installed globally and gives me an error stating 'No manual entry for racket' with racket installed to ~/, might be worth reviewing.

Support Vim 8 package management

Vim 8 added a built-in "packages" feature, which to some extent obsoletes plugin managers like pathogen. Integrating with this feature involves a new plugin layout, which luckily can coexist with the old layout: see the Rust language plugin for a good example. It would be useful for this plugin to support the Vim 8 approach in a similar way.

syntax highlighting on list of vectors breaks

Hi (thanks for writing this awesome vim plugin!)

I have come across a syntax bug where if I use a quotes and hash/pounds to denote a list of vectors literal, all code after the list literal is coloured as quoted:

e.g.

(define vec
  `(#() #() #()))

Will cause all code following it to be coloured as if it was quoted.

vim-racket shouldn't remap F9

Seems a little heavy handed to remap F9 to :!racket -t %. Every time I install vim-racket I need to go and manually remove that line.

vim crashed when open .rkt file with vim-racket

with the code below can reproduce:

#! /usr/bin/env racket
#lang racket                       <-- find this line trigger the error

(require racket/tcp)
(require web-server)

(tcp-listen 8888
            3      ; max-allow-wait
            #t     ; reuse?
            #f)    ; hostname, #f any intf

#...

system version:

ProductName:    Mac OS X
ProductVersion: 10.11.3
BuildVersion:   15D21

vim version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 18 2016 06:46:46)

K mapping does not work

When I press K on a word, looking it up in raco docs doesn't work. The command seems to run, but nothing comes up in my browser. Nor does it work if I execute it in vim directly. For example:

!raco docs list

I thought that was strange, and thought maybe vim was terminating something too quickly, and that seems to be the case, since this works for me:

!raco docs list && sleep 1

How would I get raco docs to execute correctly in vim? I'd rather not make vim sleep, as that will cause vim to hang when I use the command. This is probably the wrong place to ask, but I'm not sure what the right place to ask is, and I figure you'd be interested to know since it impacts the package. The K mapping is helpful.

Some extra notes: the argument to sleep is in seconds. It works with sleep .5, but not sleep .4 or less. I am pretty sure forcing vim to do something for longer is what makes the command work.

Highlight FIXME, TODO and XXX also if followed by a colon

Thank you for vim-racket! :-)


I would like to see FIXME, TODO and XXX (and maybe NOTE?) to be highlighted even if immediately followed by a colon.

In several other languages, I can type

<comment_character> TODO: some comment

and TODO (without the colon) is highlighted different from the normal comment color.

On the other hand, in vim-racket, writing

; TODO some comment

highlights TODO as expected, but

; TODO: some comment

highlights TODO in the regular comment color.

Since I type the colon without thinking, this means that to get the syntax highlighting for TODO etc. I need to go back and remove the colon, and it still looks as if something is missing. :-)

I guess this syntax highlighting behavior is because FIXME, TODO and XXX are, similar to other language syntax files, defined as keywords (syn keyword racketTodo FIXME TODO XXX contained), but a keyword in Racket includes the colon, so TODO: is no longer detected as introducing a TODO comment, but as its own and different keyword.

Inconsistent indentation rules

I have noticed that there is a problem with indentation, which is most visible when using classes and object-orientation.

sample:

Correct:

         (define (send-json data)
           (and
             (void? data)
             (set! data

Wrong:

         (define/public (send-json data)
                        (and
                          (void? data)
                          (set! data

In my opinion the indentation should always be 2 spaces because it makes easier to read nested statements. But anyway the behaviour should be the same btw define, define/public, define/private etc.. the same is also when declaring (class ....

autorun

ok, I like it. but a little problem is it that when I save a file or open a file it will run.
I mean how could I configure it so it would not auto-run a file whenever I open or save a file.

What does this plug-in offer?

Hello,
Was looking for a good vim plugin for racket and ended up here. Problem is, the README is empty! It doesn't say anything about what this plug-in offers, what it overrides, gotchas and so on.

Is there a documentation somewhere I'm missing?

Cheers

New line indentation ignores vim config settings

I currently have tabstop and shiftwidth set to 2 in my init.vim file for nvim, and whenever I add a new line that would be indented it forces using a single space. While I understand this is Racket convention, it still shouldn't be overruling my own settings and preferences.

Issue occurs in the current build running on NeoVim and Arch Linux, kernel 5.0.4.

#lang filetype detection is harmful

This needs to be configurable as to which dialects, or at least disableable. As it is now, adding vim-racket removes language support in vim, because what used to at least be recognized as ft=scheme is now ft=sicp or ft=br, which is worse than useless, unless you happen to have the specific plugin.

Temporary workaround for users of vim-plug:
Plug 'wlangstroth/vim-racket', { 'do': 'echo au BufRead,BufNewFile *.rkt,*.rktl set filetype=racket > ftdetect/racket.vim' }

Mappings in the script may conflict with user mappings

The script mapped "K" and 'F9" using nnoremap, but I had "K" already mapped to
something else. So maybe using nmap and vmap, or export the function for user
defined mappings is better here.
Thanks for the plugin, helps a lot.

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.