Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lsp-server] 🐞 not working on neovim + coc #3649

Open
1 task done
yuriteixeira opened this issue Jul 10, 2024 · 2 comments
Open
1 task done

[lsp-server] 🐞 not working on neovim + coc #3649

yuriteixeira opened this issue Jul 10, 2024 · 2 comments
Labels
bug lsp-server graphql-language-service-server

Comments

@yuriteixeira
Copy link

yuriteixeira commented Jul 10, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Auto-completion, "go to definition" and general LSP functionality expectations are not working.

Expected Behavior

The aforementioned expectations should work.

Steps To Reproduce

IMPORTANT: IntelliJ & https://github.com/neovim/nvim-lspconfig clients work as expected.

Environment

  • LSP Server Version:
graphql-language-service-cli 3.4.1
├── graphql-language-service 5.2.1
└─┬ graphql-language-service-server 2.13.1
  └── graphql-language-service 5.2.1
  • OS: MacOS Sonoma 14.5 (23F79)

  • LSP Client:

Nvim

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478

Coc

commit 51692dc1d148f67f18573d1afeb4724dc5a06506 (HEAD -> release, origin/release)
Author: Heyward Fann <[email protected]>
Date:   Thu Jul 4 19:38:38 2024 +0800

Anything else?

No response

@yuriteixeira yuriteixeira added bug lsp-server graphql-language-service-server labels Jul 10, 2024
@acao
Copy link
Member

acao commented Jul 11, 2024

@yuriteixeira what do you have in your graphql config file or package.json entry as per the readme?

yuriteixeira added a commit to yuriteixeira/dotfiles that referenced this issue Jul 15, 2024
Unfortunatelly, the GQL LSP integration with Coc doesn't work well,
thus we gotta use the Native NVIM LSP integration instead.

graphql/graphiql#3649
@yuriteixeira
Copy link
Author

@acao sure, here it is:

Filename: .graphqlrc.yaml

###############################################################################
# GraphQL configuration file
#
# Configure the graphQL tooling, like cli and generation of graphql typescript
# types and definitions.
#
# The 'codegen' extension manage the generation of typescript types for the
# backend graphQL API.
#
# The 'codegen' extension uses a set of plugins to generate the types:
# - typescript, convert the schema to typescript types
# - typescript-operations, convert the queries and fragments
# - near-operation-file-preset, generates the definitions next to the gql file
# - typed-document-node, create definitions for the queries with specific types
#
# More info:
# - https://graphql-cli.com/
# - https://graphql-config.com/
# - https://graphql-code-generator.com/
###############################################################################
schema: './src/libs/backend/schema.gql'
documents:
  - ./src/**/*.gql
extensions:
  codegen:
    generates:
      ./src/libs/backend/schema.gql.d.ts:
        config:
          enumsAsTypes: true
          skipTypename: true
        plugins:
          - add:
              content:
                - '/* *****************************************************************************'
                - ' * THIS FILE IS GENERATED - PLEASE DO NOT EDIT'
                - ' * '
                - ' * This file contains typescript definitions for the backend graphQL API'
                - ' *****************************************************************************/'
          - typescript
      ./src:
        preset: near-operation-file
        presetConfig:
          baseTypesPath: ./libs/backend/schema.gql.d.ts
          extension: .gql.d.ts
        config:
          documentVariableSuffix: ''
          namingConvention: 'keep'
          enumsAsTypes: true
          constEnums: true
          skipTypename: true
          exportFragmentSpreadSubTypes: true
        plugins:
          - add:
              content:
                - '/* *****************************************************************************'
                - ' * THIS FILE IS GENERATED - PLEASE DO NOT EDIT'
                - ' * '
                - ' * This file contains typescript definitions for the backend graphQL API'
                - ' *****************************************************************************/'
          - typescript-operations
          - typed-document-node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lsp-server graphql-language-service-server
Projects
None yet
Development

No branches or pull requests

2 participants