disable LSPs inbuilt formatting by default | FIX (#2016)
We mostly use null-ls for the formatting but if our current lsp server supports formatting then the null-ls one wouldnt work and we would never get an error etc or prompt to use null-ls formatter which is scaryy!! so disabling the formatting on lsp server by default
This commit is contained in:
		
							parent
							
								
									3dd0fa6c5b
								
							
						
					
					
						commit
						e1631629b9
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -7,6 +7,9 @@ local utils = require "core.utils"
 | 
			
		|||
-- export on_attach & capabilities for custom lspconfigs
 | 
			
		||||
 | 
			
		||||
M.on_attach = function(client, bufnr)
 | 
			
		||||
  client.server_capabilities.documentFormattingProvider = false
 | 
			
		||||
  client.server_capabilities.documentRangeFormattingProvider = false
 | 
			
		||||
 | 
			
		||||
  utils.load_mappings("lspconfig", { buffer = bufnr })
 | 
			
		||||
 | 
			
		||||
  if client.server_capabilities.signatureHelpProvider then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue