question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntelliJ Support Request

See original GitHub issue

I know at least one of these have been opened in the past, but they didn’t contain much information, nor did they actually offer any suggestions on how to make it work better.

So far, I’m incredibly happy with the quasar-framework, but one things that really gets at my nerves is the lack of auto complete in my IDEs such as IntelliJ. IntelliJ has great integration with webpack, npm, and even VueJs. So, in other front end component libraries I’m working with (e.g., Vuetify) I am able to see auto completion in my *.vue tiles. After a bit of poking around, it’s not that Vuetify is doing something special, they are just exposing the webpack configs in a way that allows IntelliJ to be intelligent.

As I type a component, it automatically appears. screenshot from 2018-07-03 12-06-39 Furthermore, it even knows the components properties and custom directives. screenshot from 2018-07-03 12-07-52

How does it do this? Well it’s just understanding webpack, npm and vuejs. The problem with quasar is that it obfuscates all this valuable configuration info. For instance, the base webpack config file is located in ~.nvm/versions/node/v10.5.0/lib/node_modules/quasar-cli/lib/build/webpack-config.js.

I tried just pointing my IntelliJ’s webpack configuration at that file, but it didn’t work. It still couldn’t resole the aliases such as import('layouts/default.vue'). So, I figured I would create a bare bones webpack config (that I knew wasn’t going to be used) just for the aliases.

const path = require('path')
module.exports = {
  entry: path.resolve(__dirname, '.quasar/entry.js'),
  modules: ['node_modules'],
  resolve: {
    alias: {
      src: path.resolve(__dirname, 'src'),
      layouts: path.resolve(__dirname, 'src/layouts'),
      pages: path.resolve(__dirname, 'src/pages'),
      plugins: path.resolve(__dirname, 'src/plugins'),
      router: path.resolve(__dirname, 'src/router'),
      store: path.resolve(__dirname, 'src/store'),
      utils: path.resolve(__dirname, 'src/utils'),
      statics: path.resolve(__dirname, 'src/statics'),
      css: path.resolve(__dirname, 'src/css')
    }
  }
}

This worked. It now could resolve the aliases, but then I ran into another issue. It was telling me that quasar wasn’t exporting the components I was trying to use.

I was looking at the .quasar/quasar.js file

screenshot from 2018-07-03 12-15-48

So, I looked into it and these components are exported from quasar-framework. So, I ran yarn install quasar-framework and then changed import {QSpinner, ... } from 'quasar' to import{QSpinner, ...} from 'quasar-framework/src/index.esm and VOILA!

Now, my IDE can resolve the alias paths AND knows about the components and their props, etc.

screenshot from 2018-07-03 12-19-40

The problem is that .quasar folder is generated and I’ll lose my changes! Furthermore, I have no idea what the implications of doing this are instead of simply just letting quasar-cli do everything.

Cheers, would love some input!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

15reactions
rstoenescucommented, Jul 3, 2018

Hi,

The autocompletion work is on the roadmap, in progress. It will be available soon.

2reactions
panstromekcommented, Feb 10, 2019

This is (at least partly) solved by the ide-helper extension 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Submit a request - IDEs Support (IntelliJ Platform) | JetBrains
Submit a request · Your email address · Subject · Description · Product - · Product version. Go to Help | Find Action...
Read more >
Support and assistance | IntelliJ IDEA Documentation - JetBrains
From the main menu, select Help | Contact Support to create a direct request for the support team. Report bugs. If you encounter...
Read more >
Product & Technical Support - JetBrains
Click a product below to get technical support, read the documentation, participate in community discussions, and share your feedback. IntelliJ IDEA. The ...
Read more >
HTTP Client | IntelliJ IDEA Documentation - JetBrains
Press Ctrl+Alt+Shift+Insert and select HTTP Request. Physical files can be used for documenting, testing, and validating HTTP requests. Physical files are ...
Read more >
Submit a request - YouTrack Support | JetBrains
Submit a request ... I agree to my names, email address, phone number, and country of residence being used by JetBrains to provide...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found