Giter Club home page Giter Club logo

coc-prisma's Introduction

recontrib bulletin dotfiles franciscan

coc-prisma's People

Contributors

dependabot[bot] avatar johnpyp avatar pantharshit00 avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

coc-prisma's Issues

Broken configuration property "prismaLanguageServer.prismaFmtBinPath"

Thanks for your work on this repo. It's made my introduction to prisma much smoother. Though recently it stopped working. I believe I've found the root of the issue.

The following error began popping up upon opening a .prisma file:

[coc.nvim] The "prisma" server crashed 4 times in the last 3 minutes. The server will not be restarted.

Inspecting CocCommand workspace.showOutput, we see

[Info  - 1:28:19 PM] Default version of Prisma binary 'prisma-fmt': e421996c87d5f3c8f7eeadd502d4ad402c89464d
[Info  - 1:28:19 PM] Extension name @prisma/language-server with version 2.21.2
[Info  - 1:28:19 PM] Prisma CLI version: 2.21.2
/home/khalliday/.vim/plugged/coc-prisma/node_modules/@prisma/language-server/dist/src/server.js:173
            const prismaFmtBinPath = getPrismaFmtBinPath(settings.prismaFmtBinPath);
                                                                  ^

TypeError: Cannot read property 'prismaFmtBinPath' of null
    at /home/khalliday/.vim/plugged/coc-prisma/node_modules/@prisma/language-server/dist/src/server.js:173:67
    at Generator.next (<anonymous>)
    at fulfilled (/home/khalliday/.vim/plugged/coc-prisma/node_modules/@prisma/language-server/dist/src/server.js:24:58)
[Info  - 1:28:19 PM] Connection to server got closed. Server will restart.

I believe this issue arises when @prisma/language-server attempts to get the workspace config settings here.

It seems the workspace configuration section is now prisma, not prismaLanguageServer (as it was in previous versions).

Changing my coc configuration from

  "prismaLanguageServer.prismaFmtBinPath": "",

to

  "prisma.prismaFmtBinPath": "",

You might consider updating the coc prismaFmtBinPath configuration key in your next release.

I will also note that the issue persists if you do not provide a "prisma.prismaFmtBinPath" in your coc-settings.json. Think it would be nice if you did not have to set it to the empty string to force a fallback to the default prisma-fmt path, and instead just omit the config option.

Formatting doesn't work for me

I've followed the instructions here:

https://github.com/pantharshit00/coc-prisma/blob/fc64aaa7fb0f0cdf51a84eeadee53e99fe1d3b90/README.md#formatting

However, when using the command :Format I get the following: E492: Not an editor command: Format

Also, here is what I have in my coc-settings:

...
  "coc.preferences.formatOnSaveFiletypes": [
    "css",
    "html",
    "javascript",
    "javascriptreact",
    "json",
    "jsonc",
    "markdown",
    "prisma",
    "ruby",
    "scss",
    "typescript",
    "typescriptreact",
    "yaml"
  ],
...

But it does not work for prisma. All other filetypes do format properly.

Any ideas?

prisma server crashes

I have a problem w/ the server crashing randomly. It will crash on startup most of the time but not always. It will also randomly crash on use. When restarting the server using CocCommand the issue will reoccur and I have to repeat the command several times in a row until it works.

This issue occurs regardless of the schema including blank schemas.
os:
Ubuntu 20.04.3 LTS
kernel:
Linux Blackbox 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

node: 16.13.0

IMG_20211105_165814
IMG_20211105_165515

~.config/nvim/init.vim

syntax on                                                                                               
                                                                                                        
set ruler                                                                                               
set showcmd                                                                                             
set showmode                                                                                            
                                                                                                        
set history=20                                                                                          
set incsearch                                                                                           
set browsedir=buffer                                                                                    
set cmdheight=2                                                                                         
set confirm                                                                                             
set hidden                                                                                              
set background=dark                                                                                     
                                                                                                        
                                                                                                        
set autoread                                                                                            
set noallowrevins                                                                                       
                                                                                                        
set smartindent                                                                                         
set expandtab                                                                                           
set shiftwidth=2                                                                                        
set tabstop=2                                                                                           
set linebreak                                                                                           
set number                                                                                              
                                                                                                        
set fileformat=unix                                                                                     
set nobomb                                                                                              
                                                                                                        
let g:coc_force_debug=1                                                                                 
call plug#begin(stdpath('data').'/plugged')                                                             
  Plug 'preservim/nerdtree'                                                                             
  Plug 'Xuyuanp/nerdtree-git-plugin'                                                                    
  Plug 'tiagofumo/vim-nerdtree-syntax-highlight'                                                        
  Plug 'vim-airline/vim-airline'                                                                        
  Plug 'vim-airline/vim-airline-themes'                                                                 
  Plug 'cocopon/iceberg.vim'                                                                            
  Plug 'bling/vim-bufferline'                                                                           
  Plug 'neoclide/coc.nvim', {'branch': 'release'}                                                       
  Plug 'vim-scripts/Rainbow-Parenthesis'                                                                
  Plug 'ryanoasis/vim-devicons'                                                                         
  Plug 'tpope/vim-fugitive'                                                                             
  Plug 'pantharshit00/vim-prisma'                                                                       
call plug#end()                                                                                         
                                                                                                        
colorscheme iceberg                                                                                     
let g:arline_theme='deus'                                                                               
augroup nerdtree                                                                                        
  autocmd StdinReadPre * let s:std_in=1                                                                 
  autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif                           
                                                                                                        
  autocmd StdinReadPre * let s:std_in=1                                                                 
  autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | execute 'NERDTree
' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif                                         
augroup END                                                                                             
                                                                                                        
augroup filetypedetect                                                                                  
  autocmd BufNewFile,BufRead *.cjs setf javascript                                                      
  autocmd BufNewFile,BufRead *.mts setf typescript                                                      
  autocmd BufNewFile,BufRead *.cts setf typescript                                                      
augroup END                                                                                             
let g:coc_filetype_map={'cjs':'javascript', 'mts': 'typescript', 'cts': 'typescript'}

~/.config/nvim/coc-settings.json

{                                                                                                       
  "tsserver.enable": true,                                                                              
  "tsserver.npm": "/usr/bin/pnpm",                                                                      
  "typescript.preferences.quoteStyle": "single",                                                        
  "eslint.enable": true,                                                                                
  "eslint.packageManager": "pnpm",                                                                      
  "prisma.prismaFmtBinPath": ""                                                                         
}

`coc-prisma` won't install.

I'm new to coc and vim in general, I was hoping you could help me out. I've tried running :CocInstall coc-prisma, the installation works but when I try listing my services, prisma doesn't show up. Autocomplete and formatting are also not working.

Does not seem to work longer

I have this specified in my init.vim file.

let g:coc_global_extensions = ['coc-eslint', 'coc-json', 'coc-pairs', 'coc-prettier', 'coc-tailwindcss', 'coc-tsserver', 'coc-emmet', 'coc-prisma']

But, I don't seem to get any validation or autocompletion?
image


Neovim version: v0.5.0
coc-prisma version: v0.10.0

# server crashes

after opening .prima file a message pops server crashes n extension stops working

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.