This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
PrismaFmt built-in replaces the content of schema.prisma file #1612
Labels
bug
Something isn't working
FAQ
Issues
Neovim Version
v0.10.0-dev-601+gd55d7646c
Dev Version?
Operating System
Windows 11 Home 22H2
Minimal Config
Steps to Reproduce
""" schema.prisma
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
"""
Reproducibility Check
minimal_init.lua
template and that my issue is reproducible by runningnvim --clean -u minimal_init.lua
and following the steps above.Expected Behavior
Formatting the schema.prisma file just like the vscode extension or by running the
prisma format
Actual Behavior
The content of schema.prisma is replaced with the actual output of
prisma format
Debug Log
[TRACE Sat Jul 1 03:47:00 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method shutdown
[TRACE Sat Jul 1 03:47:00 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method exit
[TRACE Sat Jul 1 03:47:01 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/client.lua:97: starting null-ls client
[TRACE Sat Jul 1 03:47:01 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method initialize
[DEBUG Sat Jul 1 03:47:01 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/client.lua:152: unable to notify client for method textDocument/didOpen (client not active): {
textDocument = {
uri = "file:///C:/Users/storm/Desktop/schema.prisma"
}
}
[TRACE Sat Jul 1 03:47:01 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method initialized
[TRACE Sat Jul 1 03:47:01 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method textDocument/didOpen
[TRACE Sat Jul 1 03:47:01 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS_ON_OPEN
[DEBUG Sat Jul 1 03:47:01 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/generators.lua:24: no generators available
[TRACE Sat Jul 1 03:47:08 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method textDocument/formatting
[TRACE Sat Jul 1 03:47:08 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_FORMATTING
[DEBUG Sat Jul 1 03:47:08 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:321: spawning command "prisma" at C:\Users\storm\Desktop with args { "format", "C:\Users\storm\Desktop\schema.prisma" }
[TRACE Sat Jul 1 03:47:08 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:205: error output: nil
[TRACE Sat Jul 1 03:47:08 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:206: output: Prisma schema loaded from schema.prisma
Formatted C:\Users\storm\Desktop\schema.prisma in 8ms 🚀
[DEBUG Sat Jul 1 03:47:08 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/formatting.lua:89: received edits from generators
[TRACE Sat Jul 1 03:47:08 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/formatting.lua:90: {
newText = "Prisma schema loaded from schema.prisma\nFormatted C:\Users\storm\Desktop\schema.prisma in 8ms 🚀",
range = {
["end"] = {
character = 1,
line = 10
},
start = {
character = 0,
line = 0
}
},
rangeLength = 230
}
[TRACE Sat Jul 1 03:47:10 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method textDocument/didChange
[TRACE Sat Jul 1 03:47:10 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS
[DEBUG Sat Jul 1 03:47:10 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/generators.lua:24: no generators available
[TRACE Sat Jul 1 03:47:10 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method textDocument/didSave
[TRACE Sat Jul 1 03:47:10 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS_ON_SAVE
[DEBUG Sat Jul 1 03:47:10 2023] C:\Users\storm\AppData\Local\Temp\nvim\site\pack\packer\start\null-ls.nvim/lua/null-ls/generators.lua:24: no generators available
Help
No
Implementation Help
No response
Requirements
The text was updated successfully, but these errors were encountered: