@@ -34,7 +34,9 @@ require("lazy").setup({
34
34
},
35
35
36
36
37
- { ' nvim-treesitter/nvim-treesitter' , build = ' :TSUpdate' , },
37
+ -- { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', },
38
+
39
+ {" nvim-treesitter/nvim-treesitter" , build = " :TSUpdate" },
38
40
{ ' mbbill/undotree' },
39
41
{ ' ms-jpq/coq_nvim' , branch = ' coq' },
40
42
@@ -50,6 +52,116 @@ require("lazy").setup({
50
52
-- " - comment banner
51
53
-- " - etc
52
54
55
+ -- lsp-zero
56
+ {
57
+ ' VonHeikemen/lsp-zero.nvim' ,
58
+ branch = ' v3.x' ,
59
+ dependencies = {
60
+ --- Uncomment these if you want to manage LSP servers from neovim
61
+ {' williamboman/mason.nvim' },
62
+ {' williamboman/mason-lspconfig.nvim' },
63
+
64
+ -- Autocompletion
65
+ {
66
+ ' hrsh7th/nvim-cmp' ,
67
+ event = ' InsertEnter' ,
68
+ config = function ()
69
+ local cmp = require (' cmp' )
70
+
71
+ cmp .setup ({
72
+ sources = {
73
+ {name = ' nvim_lsp' },
74
+ },
75
+ mapping = cmp .mapping .preset .insert ({
76
+ [' <C-space>' ] = cmp .mapping .complete (),
77
+ [' <C-u>' ] = cmp .mapping .scroll_docs (- 4 ),
78
+ [' <C-d>' ] = cmp .mapping .scroll_docs (4 ),
79
+ }),
80
+ snippet = {
81
+ expand = function (args )
82
+ vim .snippet .expand (args .body )
83
+ end ,
84
+ },
85
+ })
86
+ end
87
+ },
88
+
89
+ -- LSP Support
90
+ {
91
+ ' neovim/nvim-lspconfig' ,
92
+ cmd = " LspInfo" ,
93
+ event = {' BufReadPre' , ' BufNewFile' },
94
+ dependencies = {
95
+ -- Autocompletion
96
+ {' hrsh7th/cmp-nvim-lsp' },
97
+ },
98
+ init = function ()
99
+ local lsp_defaults = require (' lspconfig' ).util .default_config
100
+
101
+ -- add cmp_nvim_lsp capabilities settings to lspconfig
102
+ -- this should be executed before you configure any language server
103
+ lsp_defaults .capabilities = vim .tbl_deep_extend (
104
+ ' force' ,
105
+ lsp_defaults .capabilities ,
106
+ require (' cmp_nvim_lsp' ).default_capabilities ()
107
+ )
108
+
109
+ -- LspAttach is used to enable features when
110
+ -- there is a language server active for the file
111
+ vim .api .nvim_create_autocmd (' LspAttach' , {
112
+ desc = ' LSP actions' ,
113
+ callback = function (event )
114
+ local opts = {buffer = event .buf }
115
+
116
+ vim .keymap .set (' n' , ' K' , ' <cmd>lua vim.lsp.buf.hover()<cr>' , opts )
117
+ vim .keymap .set (' n' , ' gd' , ' <cmd>lua vim.lsp.buf.definition()<cr>' , opts )
118
+ vim .keymap .set (' n' , ' gD' , ' <cmd>lua vim.lsp.buf.declaration()<cr>' , opts )
119
+ vim .keymap .set (' n' , ' gi' , ' <cmd>lua vim.lsp.buf.implementation()<cr>' , opts )
120
+ vim .keymap .set (' n' , ' go' , ' <cmd>lua vim.lsp.buf.type_definition()<cr>' , opts )
121
+ vim .keymap .set (' n' , ' gr' , ' <cmd>lua vim.lsp.buf.references()<cr>' , opts )
122
+ vim .keymap .set (' n' , ' gs' , ' <cmd>lua vim.lsp.buf.signature_help()<cr>' , opts )
123
+ vim .keymap .set (' n' , ' <F2>' , ' <cmd>lua vim.lsp.buf.rename()<cr>' , opts )
124
+ vim .keymap .set ({' n' , ' x' }, ' <F3>' , ' <cmd>lua vim.lsp.buf.format({async = true})<cr>' , opts )
125
+ vim .keymap .set (' n' , ' <F4>' , ' <cmd>lua vim.lsp.buf.code_action()<cr>' , opts )
126
+
127
+ end ,
128
+ })
129
+
130
+ -- require('lspconfig').gleam.setup({})
131
+ -- require('lspconfig').ocamllsp.setup({})
132
+
133
+ end
134
+ },
135
+
136
+ -- Snippets
137
+ {' L3MON4D3/LuaSnip' ,lazy = true },
138
+
139
+ },
140
+ },
141
+
142
+ {' julian/lean.nvim' },
143
+ -- -- julian's lean.nvim LSP
144
+ -- {
145
+ -- 'julian/lean.nvim',
146
+ -- dependencies = {
147
+ -- 'VonHeikemen/lsp-zero.nvim',
148
+ -- --'neovim/nvim-lspconfig',
149
+ -- 'nvim-lua/plenary.nvim',
150
+
151
+ -- -- Autocompletion
152
+ -- -- below already is being imported by
153
+ -- -- lsp-zero dependency tree
154
+
155
+ -- --'hrsh7th/nvim-cmp',
156
+ -- --'hrsh7th/cmp-nvim-lsp',
157
+ -- --'hrsh7th/cmp-buffer',
158
+ -- --'hrsh7th/cmp-path',
159
+ -- },
160
+ -- opts = {
161
+ -- mappings = true,
162
+ -- }
163
+ -- },
164
+
53
165
54
166
-- "=====> https://github.com/andweeb/presence.nvim
55
167
-- { 'andweeb/presence.nvim' }
@@ -120,28 +232,7 @@ require("lazy").setup({
120
232
-- " Optional: better Rnoweb support (LaTeX completion)
121
233
{ ' lervag/vimtex' },
122
234
123
- -- lsp-zero
124
- {
125
- ' VonHeikemen/lsp-zero.nvim' ,
126
- branch = ' v3.x' ,
127
- dependencies = {
128
- --- Uncomment these if you want to manage LSP servers from neovim
129
- {' williamboman/mason.nvim' },
130
- {' williamboman/mason-lspconfig.nvim' },
131
235
132
- -- LSP Support
133
- {' neovim/nvim-lspconfig' },
134
-
135
- -- Autocompletion
136
- {' hrsh7th/nvim-cmp' },
137
- {' hrsh7th/cmp-nvim-lsp' },
138
- {
139
- ' L3MON4D3/LuaSnip' ,
140
- lazy = true
141
- },
142
-
143
- },
144
- },
145
236
146
237
-- NotebookNavigator for Python REPL
147
238
{
@@ -201,24 +292,7 @@ require("lazy").setup({
201
292
},
202
293
},
203
294
204
- -- julian's lean.nvim
205
- {
206
- ' julian/lean.nvim' ,
207
- dependencies = {
208
- ' VonHeikemen/lsp-zero.nvim' ,
209
- -- 'neovim/nvim-lspconfig',
210
- ' nvim-lua/plenary.nvim' ,
211
295
212
- -- Autocompletion
213
- ' hrsh7th/nvim-cmp' ,
214
- -- 'hrsh7th/cmp-nvim-lsp',
215
- -- 'hrsh7th/cmp-buffer',
216
- -- 'hrsh7th/cmp-path',
217
- },
218
- opts = {
219
- mappings = true ,
220
- }
221
- }
222
296
},
223
297
-- Configure any other settings here. See the documentation for more details.
224
298
-- colorscheme that will be used when installing plugins.
0 commit comments