working fennel-ls wowsa
This commit is contained in:
		
							parent
							
								
									708e0fec3a
								
							
						
					
					
						commit
						a90219e7cd
					
				|  | @ -505,22 +505,6 @@ in | |||
|               format = lspkind.cmp_format({ | ||||
|                 mode = 'symbol_text',  | ||||
|                 maxwidth = 50,  | ||||
|               -- old format | ||||
|               -- format = function(entry, vim_item) | ||||
|               --     -- fancy icons and a name of kind | ||||
|               --     vim_item.kind = require("lspkind").presets.default[vim_item.kind] .. | ||||
|               --                         " " .. vim_item.kind | ||||
|               --     -- set a name for each source | ||||
|               --     vim_item.menu = ({ | ||||
|               --         buffer = "[Buffer]", | ||||
|               --         nvim_lsp = "[LSP]", | ||||
|               --         look = "[Look]", | ||||
|               --         path = "[Path]", | ||||
|               --         spell = "[Spell]", | ||||
|               --         calc = "[Calc]", | ||||
|               --     })[entry.source.name] | ||||
|               --     return vim_item | ||||
|               -- end | ||||
|             }) | ||||
|           }, | ||||
|           mapping = { | ||||
|  | @ -625,11 +609,20 @@ in | |||
|         }, | ||||
|       }) | ||||
| 
 | ||||
|       local capabilities = vim.lsp.protocol.make_client_capabilities() | ||||
|       capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) | ||||
|       capabilities = require('cmp_nvim_lsp').default_capabilities() | ||||
| 
 | ||||
|       -- fennel-ls is bleeding edge | ||||
|       local lspconfig = require('lspconfig') | ||||
|       local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua', 'fennel-ls' } | ||||
|       require("lspconfig.configs")["fennel-ls"] = { | ||||
|         default_config = { | ||||
|           cmd = {"fennel-ls"}, | ||||
|           filetypes = {"fennel"}, | ||||
|           root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end, | ||||
|           settings = {} | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua'} | ||||
|       for _, lsp in ipairs(servers) do | ||||
|         lspconfig[lsp].setup { | ||||
|           on_attach = function(client, bufnr) | ||||
|  | @ -640,12 +633,20 @@ in | |||
|         } | ||||
|       end | ||||
|       -- rnix doesn't support gps | ||||
|       require('lspconfig').rnix.setup { | ||||
|       lspconfig['rnix'].setup { | ||||
|         on_attach = function(client, bufnr) | ||||
|           format.on_attach(client) | ||||
|         end, | ||||
|         capabilities = capabilities, | ||||
|       } | ||||
|       -- fennel-ls doesn't support gps | ||||
|       lspconfig['fennel-ls'].setup { | ||||
|         on_attach = function(client, bufnr) | ||||
|           format.on_attach(client) | ||||
|         end, | ||||
|         capabilities = capabilities, | ||||
|       } | ||||
| 
 | ||||
|       -- deprecated pylsp | ||||
|       -- require('lspconfig').pylsp.setup { | ||||
|       --   on_attach = function(client, bufnr) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue