Code Monkey home page Code Monkey logo

alpine-intellisense's Introduction

alpine-intellisense's People

Contributors

pcbowers avatar

Stargazers

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

Watchers

 avatar

Forkers

ivanjeremic

alpine-intellisense's Issues

The extension doesn't respect workspace settings, only user's

I'm working with VSC a DevContainer and I usually rely on settings that are put in [./.vscode/settings.json] within the project's directory, which is read as "overriding", "workspace" settings that should have priority over user settings as far as my understanding goes... (gasp)

So, no, the extension doesn't respect those!

When I apply:

"alpine-intellisense.settings.languageScopes": "blade",

It only works if it's in my personal [settings.json]. And when it's deleted from it and added to the workspace's, the extension defaults back to only supporting html instead.

Quotes within a PHP tag aren't ignored

Quotes within a PHP tag aren't ignored as they should be. This causes syntax highlighting to break.

Here's an example of an inline PHP tag within a <script> tag with proper JavaScript syntax highlighting:
image

Here's the same example using this plugin:
image

The syntax highlighting is broken after encountering the first ' inside of the PHP statement as it thinks it's a matching quote. If I swap single or double quote on the attribute it has the same issue.

Blade syntax conflict

When using [Laravel Blade Snippets] extension, which provides syntax highlighting for Blade files that could contain Alpine.js code, the syntax highlighting for Alpine.js code works flawlessly; except for overriding Laravel's Blade directives highlighting, where it makes them pure white!

Here is the look with Laravel Blade Snippets extension alone:
image

And here is how it looks with your extension along (both altogether):
image

[Feature] Limit intellisense within the classes

Greetings,

Does the extension work so that its intellisense is limited to html tags? If I press ctrl+space outside html tags, I still get all of the alpine directives and stuff.

Thanks.

highlighting tailwind class directives

First, I"m happy with seeing highlighting instead of a single color, so thank you for your work!

It's fairly obvious why the below happens, but just pointing it out.

image

Possible to limit parsing to x-*= @data-name= :data-name= maybe?

I have a feeling the x- directive is being removed in future Alpine releases however.

Inspiration for personal project

Hello and first of all thanks for this good extension, sorry for asking here in the issues but there is no discussion tab.

I want to extend .html too for a non alpinejs related project what I noticed when writing events with this extension there is not really an autocomplete for the javascript code written in the script tag, for example

<body>
    <script>
      function clickHandler() {
        console.log("boo");
      }
    </script>

    // the alpine click gives no autocomplete
    <div x-on:click="clickHandler()">Here</div>

    //the native onclick gives autocomplete for clickHandler
    <div onclick="clickHandler()">Here</div>
</body>

Is this supposed to work that way and if not is it possible to tell an custom attribute that everything between "..." should be javascript?

Again sorry for asking here but I'm currently really interested in solving this for me without creating a whole new language. Thanks

Issue with intellisense in 'regular' text.

I'm seeing the extension be a bit aggressive in terms of suggestions when typing. So for example, on a page w/ no JS at all, I typed:

<p>
Hello world.
</p>

When I typed the period at the end, I got:

image

As I'm a fast typer, I ened up with: Hello world.alt.

Any reason why it is prompting for stuff with just a period?

[Bug]: highlighting string with // syntax as comments

software version

  1. Alpine Js : 3.13.3
  2. Extension : 1.0.2

here the screen capture:

output

current workaround / temporary fix is to use the Sperovita/alpinejs-syntax-highlight and disabling this extension grammar via the package.json as this extension is overrode the Sperovita's syntax highlighting.

Here is how you could disable this grammar :

  1. Locate the extension directory on your disc. On Windows, for instance, you'll find it in %USERPROFILE%/.vscode/extensions/pcbowers.alpine-intellisense-1.0.2
  2. Edit the package.json file in that directory.
  3. Locate & delete the grammars
"contributes": {
		"configuration": {
			"title": "Alpine.js IntelliSense",
			"properties": {
				"alpine-intellisense.settings.languageScopes": {
					"type": "string",
					"markdownDescription": "Defines the language scopes for which the snippets will be available.\nUse comma separated values. For example: `html,php,twig,nunjucks`.\nDefault is `html`.",
					"default": "html"
				}
			}
		},
               vvv START DELETE LINE vvv
		"grammars": [
			{
				"scopeName": "alpine-intellisense.injection",
				"path": "./syntaxes/alpine-intellisense.injection.json",
				"injectTo": [
					"text.html"
					],
				"embeddedLanguages": {
					"source.js": "javascript"
				}
			}
		],
               ^^^ END DELETE LINE ^^^
		"html": {
			"customData": [
				"./syntaxes/html.html-data.json"
			]
		},
		"snippets": [
			{
				"path": "./snippets/snippets.code-snippets"
			}
		]
	},
  1. Save the file, close and re-open VS Code (it may warn you on startup that the extension was changed on disc and to reload again; click Ok in the notification and do so).

  2. Viola you can keep using this extension and use the syntax highlighting from Sperovita/alpinejs-syntax-highlight extension.

image

The documentation feature only works for HTML files

Greetings, and thank kindly you for the amazing extension.

I noticed that the documentation feature, which I consider to be the best out of the extension's, doesn't work for any other file types, even when defined using the extension setting.

Is there any easy solution to make that documentation popup shows up for Blade files, after setting it using the following code?

"alpine-intellisense.settings.languageScopes": "blade",

[Feature Request:] Support for attributes that are created via helper functions in php

Hi there!

first of all: Amazing work on this package! Reading the regexes makes my brain hurt ๐Ÿ˜„

I'm having a use case where I don't know how common it is. I construct my html attributes via a helper function attr(), where each attribute is in 'key' => 'value' form. alpine-intellisense picks some attributes up, others don't work. Here's an example:

CleanShot 2024-06-07 at 22 20 41@2x

Would you guys be interested in adding support for this kind of syntax?

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.