Skip to content

tern_for_vim does not work for Node React+Three.js Project #192

@yiakwy

Description

@yiakwy

Here is my project hierarchy

.
├── assets
├── dist
├── node_modules
├── package-lock.json
├── package.json
├── setup.sh
├── src
└── webpack.config.js

I have a local standard .tern-project file in the root

{
  "libs": [ "browser", "ecma6" ],
  "plugins": {
    "node": {},
    "complete_strings": {},
    "es_modules": {}
  }
}

And now I am writing a three.js project

import * as THREE from "three"
import OrbitControls from "three/examples/js/controls/OrbitControls.js"
import SETTINGS from "settings.yaml"
import * as React from "react"

class Renderer {
	constructor() {
		this.renderer = new THREE.WebGLRenderer()
		this.scene = new THREE.Scene()
		this.camera = new THREE.PerspectiveCamera(
			SETTINGS.camera.NORMAL.Angle_View,
			window.innerWidth / window.innerHeight, // aspect
			SETTINGS.camera.NORMAL.NEAR,
			SETTINGS.camera.NORMAL.FAR

It seems that completer plugin cannot see the file "settings.yaml" residing in "src/" and cannot complete when I type THREE. But it works good with react.

It cannot complete any file when I try to import.

All the dependencies in package.jason are valid and I can work well with python and C.

So I have no idea why this happened.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions