Giter Club home page Giter Club logo

vim-laravel's Introduction

Sorry, I'm no longer hosting code on GitHub.1

You can find up-to-date copies of all code repositories at codeberg.org/noahfrederick.

If you use a Vim/Neovim plug-in managed via Git, you will need to update the name/URL from, e.g., noahfrederick/vim-plugin-name to https://codeberg.org/noahfrederick/vim-plugin-name to continue receiving updates.

Footnotes

  1. Copilot (a commercial LLM trained on source-available code hosted on GitHub without the authors' knowledge or consent) represents an unacceptable incursion by Microsoft, an attempt to lay claim to undefended territory in their quest to capture surplus value.

    There are also other reasons to avoid using GitHub, such as the requirement to run non-free JavaScript to use certain features of the website, and Microsoft's unscrupulous business contracts. โ†ฉ

vim-laravel's People

Contributors

adriaanzon avatar fatboyxpc avatar mitchazj avatar noahfrederick 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

vim-laravel's Issues

gf for routes

It would be awesome if gf while inside route('route.name') would take the user to the route handler. I figure maybe this feature could leverage artisan route:list behind the scenes. This might be tough for closure routes since we'd likely have to parse out the various route files manually, which might be named differently. The router has a base_path() option, so we could look into seeing if it stores that state anywhere, but even then, I was on a project that looped over a set of files in a directory and did a plain ol' require in the RouteServiceProvider.

I think this would also be cool for url() but I'm not sure how hard it would be to compare url("foo/bar/{$user->id}") to Route::get('foo/bar/{user}').

Automatically import namespaces

This plugin would be more productive when it can recognize the classes and automatically import the namespaces of them. ๐Ÿค”

Laravel 8 models directory

Hey there, thanks for making this plugin! I've found it really handy while working on Laravel projects in vim.

Having just upgraded to Laravel 8, I've noticed that the automatic editing feature breaks when it comes to making new models. Laravel 8 automatically places new models in the app/Models/ directory if it exists, but vim-laravel still tries to open the new model from the app/ directory instead. It looks like opening models from app/Models/ if possible was built into the plugin originally, but was removed in #2. Reverting this change fixes things for me in Laravel 8, though there should probably be some kind of check for which version of Laravel is being used so that it doesn't break the plugin for Laravel <8.0 users.

I'm happy to get a PR started, but I'm afraid my vimscript knowledge isn't strong enough to get that version check working. Again, thanks for the work you've put into this plugin!

Gnome Terminal not working

I want to run :Artisan serve in background. I am using gnome terminal. How to I archive it. I don't know how tpope/vim-dispatch work. Can you pls help me on it.

Fzf.vim integration?

Curious if you use fzf.vim? It would be cool to have fzf.vim integration for fuzzy searching available artisan commands. Upon selection, it would autofill the artisan command in, but leave you to add flags and/or press enter to execute the command. Thoughts?

gf for Config seems incorrect

I was trying gf with config('services.stripe.secret') and it seemed to want to open up config/services/stripe/secret.php instead of config/services/stripe.php.

Edit: I also get the same behavior with config('app.name'). This certainly seems like a bug?

2019-02-23_00 47 50_fatboyxpc

:Artisan in new window

Thanks for this plugin! It's really helped speed up my dev workflow.

I'm still pretty new to vim, so I'm not sure I'll explain this with the correct terminology.

My development usually starts like:

cd repo-to-work-on
vim .

At some point I'll want to make a new test/model/migration/something. So I usually will open a new window: <C-w> n At this point, unfortunately it seems it's not detecting that I'm inside a Laravel ecosystem, so :Artisan will complain:

E492: Not an editor command: Artisan

I've tried to understand the detection process but this is a bit over my head right now. Am I misunderstanding something? Is there a way to get this to work for my use case?

E700: Unknown function: ... (Vim 8.2)

I installed using vundle.

Plugin 'tpope/vim-dispatch'             "| Optional
Plugin 'tpope/vim-projectionist'        "|
Plugin 'noahfrederick/vim-composer'     "|
Plugin 'noahfrederick/vim-laravel'

when I open vim this red message appears.

Error detected while processing VimEnter Autocommands for "*"..function ProjectionistDetect[43]..VimEnter Autocommands for "*"..function ProjectionistDetect[40]..User Autocommands for "ProjectionistDetect"..function <SNR>56_projectionist_detect[2]..script /Users/dele/.vim/bundle/vim-composer/autoload/composer.vim[144]..function <SNR>100_add_methods[2]..<SNR>100_function:
line    1:
E700: Unknown function: <SNR>56_project_path
Press ENTER or type command to continue
Error detected while processing VimEnter Autocomman

all vim-laravel features don't work.

my vim version :

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct  4 2020 16:40:08)
macOS version
Included patches: 1-1800

Issues with installation

Hi,

I have added

Plug 'noahfrederick/vim-composer'
Plug 'noahfrederick/vim-laravel'

and ran

:so %
:PlugInstall

But when I run a new instance of nvim, and try :Artisan, or :Eview, etc, none of the commands exist.

Where have I gone wrong?

Cheers

No matching autocommands

I just updated to get the latest fix for gf and I get this error message every time I open a new file:

"app/Providers/AppServiceProvider.php" 34L, 708C
No matching autocommands
Press ENTER or type command to continue

The filename is the file that I open. If it's already open in a buffer this doesn't happen. It doesn't matter if I use fzf.vim or gf to open the file. If I comment out Plug 'noahfrederick/vim-laravel' I don't get this error anymore.

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.