Skip to content

Commit 50cd823

Browse files
committed
Updated Readme
1 parent bd992f9 commit 50cd823

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ use {
4747
config = function()
4848
require('prisma').setup()
4949
end
50-
opts = {
51-
-- default configuration
52-
}
5350
}
5451
```
5552

@@ -72,6 +69,33 @@ require('prisma').setup({
7269
})
7370
```
7471

72+
73+
### Using with NvChad
74+
75+
```lua
76+
{
77+
'dastanaron/prisma.nvim',
78+
event = "VeryLazy",
79+
dependencies = {
80+
'williamboman/mason.nvim',
81+
'neovim/nvim-lspconfig',
82+
'nvim-treesitter/nvim-treesitter'
83+
},
84+
config = function()
85+
local nvlsp = require "nvchad.configs.lspconfig"
86+
require('prisma').setup({
87+
lsp = {
88+
on_attach = function(client, bufnr)
89+
nvlsp.on_attach(client, bufnr)
90+
end,
91+
capabilities = nvlsp.capabilities,
92+
on_init = nvlsp.on_init,
93+
}
94+
})
95+
end,
96+
}
97+
```
98+
7599
## Usage
76100

77101
### Basic Workflow
@@ -90,9 +114,6 @@ require('prisma').setup({
90114
91115
" Show schema diagnostics
92116
:LspInfo
93-
94-
" Show documentation
95-
K
96117
```
97118

98119
### Custom Keybindings

lua/prisma/lsp.lua

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ function M.setup(config)
1616
if config.lsp.on_attach then
1717
config.lsp.on_attach(client, bufnr)
1818
end
19-
20-
if config.lsp.on_attach then
21-
config.lsp.on_attach(client, bufnr)
22-
end
23-
24-
if config.lsp.on_init then
25-
config.lsp.on_init(client, bufnr)
26-
end
2719
end
2820

2921
local default_on_init = function(client, bufnr)

0 commit comments

Comments
 (0)