Giter VIP home page Giter VIP logo

gnls's Introduction

GN Language Server

Code IntelliSense for GN build system.

Features

  • Syntax error display.
  • Auto completion for common targets, functions and variables.
  • Hover to view documentation for common targets, functions and variables.
  • Click to open referred target or file.
  • Provide hierarchy of targets and if conditions to help navigate in large files.
  • Code format.

Usage

Currently there are no options to configure. Simply install the corresponding editor extension, and you are good to go:

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT license.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

gnls's People

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

Watchers

 avatar  avatar  avatar  avatar

gnls's Issues

Error in CentOS docker container

Hi. I have following error when trying to install your extension

Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/builder/.vscode-server/extensions/msedge-dev.gnls-0.1.3/build/linux-x64.node)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/builder/.vscode-server/extensions/msedge-dev.gnls-0.1.3/build/server.js:1:144612)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'
lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 8.5.2111
Release:        8.5.2111
Codename:       n/a

NOT working on linux arm64

Error: Cannot find module '../build/linux-arm64.node'
Require stack:

  • /home/parallels/.vscode-server/extensions/msedge-dev.gnls-0.1.4/build/server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/home/parallels/.vscode-server/extensions/msedge-dev.gnls-0.1.4/build/server.js:1:58320)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/parallels/.vscode-server/extensions/msedge-dev.gnls-0.1.4/build/server.js'
    ]
    }
    [Error - 11:43:16 AM] Server initialization failed.
    Message: Pending response rejected since connection got disposed
    Code: -32097

Crashes on M1 MacBook Pro

Logs attached.
logs.txt

The primary issues seems to be:
Error: dlopen(/Users/isaacpaul/.vscode/extensions/msedge-dev.gnls-0.1.0/build/darwin.node, 1): no suitable image found. Did find: /Users/isaacpaul/.vscode/extensions/msedge-dev.gnls-0.1.0/build/darwin.node: mach-o, but wrong architecture /Users/isaacpaul/.vscode/extensions/msedge-dev.gnls-0.1.0/build/darwin.node: mach-o, but wrong architecture

I'm assuming the plugin wasn't built for arm64 as that seems to be a common problem

[Feature Request] Provide information on the conditionals that apply to a given line

Some GN files are quite big that it gets tricky to find out when a given source file is built.

For example, consider chrome/browser/BUILD.gn, which has 7k+ lines. In this example

Screenshot of chrome/browser/BUILD.gn

, it's easy to determine that pdf_to_emf_converter.cc is only built when both enable_basic_printing and is_win are set. However, in other cases, we're so deep inside a list that we lose track of the conditionals that have been applied to the source file in question.

Is this something that the language server can help with? Maybe by populating the outline tab?

Outline tab in VS Code

Cannot run on Ubuntu 18.04 LTS (WSL2)

it cannot run on Ubuntu 18.04 (WSL2) as always compiling about the missing of GLIBC_2.28
image

Here is my ldd output

> ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

And my libc did not have the 2.28 support.
image

image

But it's a builtin glibc in Ubuntu 18.04 which means upgrading glibc is a very dangerous operation....

Does this GN language server support GLIBC_2.28 below?

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.