mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	lsp/harper-ls: init
This commit is contained in:
		
					parent
					
						
							
								f1a309082e
							
						
					
				
			
			
				commit
				
					
						c752aaa24f
					
				
			
		
					 6 changed files with 68 additions and 0 deletions
				
			
		|  | @ -31,6 +31,7 @@ isMaximal: { | ||||||
|       lspSignature.enable = !isMaximal; # conflicts with blink in maximal |       lspSignature.enable = !isMaximal; # conflicts with blink in maximal | ||||||
|       otter-nvim.enable = isMaximal; |       otter-nvim.enable = isMaximal; | ||||||
|       nvim-docs-view.enable = isMaximal; |       nvim-docs-view.enable = isMaximal; | ||||||
|  |       harper-ls.enable = isMaximal; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     debugger = { |     debugger = { | ||||||
|  |  | ||||||
|  | @ -524,3 +524,9 @@ | ||||||
| [diced](https://github.com/diced): | [diced](https://github.com/diced): | ||||||
| 
 | 
 | ||||||
| - Fixed `typescript` treesitter grammar not being included by default. | - Fixed `typescript` treesitter grammar not being included by default. | ||||||
|  | 
 | ||||||
|  | [gmvar](https://github.com/gmvar): | ||||||
|  | 
 | ||||||
|  | [harper-ls]: https://github.com/Automattic/harper | ||||||
|  | 
 | ||||||
|  | - Add [harper-ls] to the `vim.lsp` module. | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ | ||||||
|     ./lspconfig |     ./lspconfig | ||||||
|     ./lspsaga |     ./lspsaga | ||||||
|     ./null-ls |     ./null-ls | ||||||
|  |     ./harper-ls | ||||||
| 
 | 
 | ||||||
|     # lsp plugins |     # lsp plugins | ||||||
|     ./lspsaga |     ./lspsaga | ||||||
|  |  | ||||||
							
								
								
									
										19
									
								
								modules/plugins/lsp/harper-ls/config.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								modules/plugins/lsp/harper-ls/config.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | { | ||||||
|  |   config, | ||||||
|  |   lib, | ||||||
|  |   pkgs, | ||||||
|  |   ... | ||||||
|  | }: let | ||||||
|  |   inherit (lib.modules) mkIf; | ||||||
|  |   inherit (lib.meta) getExe; | ||||||
|  | 
 | ||||||
|  |   cfg = config.vim.lsp; | ||||||
|  | in { | ||||||
|  |   config = mkIf (cfg.enable && cfg.harper-ls.enable) { | ||||||
|  |     vim.lsp.servers.harper-ls = { | ||||||
|  |       root_markers = [".git"]; | ||||||
|  |       cmd = [(getExe pkgs.harper) "--stdio"]; | ||||||
|  |       settings = {harper-ls = cfg.harper-ls.settings;}; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										6
									
								
								modules/plugins/lsp/harper-ls/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								modules/plugins/lsp/harper-ls/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | { | ||||||
|  |   imports = [ | ||||||
|  |     ./harper-ls.nix | ||||||
|  |     ./config.nix | ||||||
|  |   ]; | ||||||
|  | } | ||||||
							
								
								
									
										35
									
								
								modules/plugins/lsp/harper-ls/harper-ls.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								modules/plugins/lsp/harper-ls/harper-ls.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,35 @@ | ||||||
|  | {lib, ...}: let | ||||||
|  |   inherit (lib.options) mkOption mkEnableOption; | ||||||
|  |   inherit (lib.types) anything attrsOf; | ||||||
|  | in { | ||||||
|  |   options.vim.lsp.harper-ls = { | ||||||
|  |     enable = mkEnableOption "Harper grammar checking LSP"; | ||||||
|  |     settings = mkOption { | ||||||
|  |       type = attrsOf anything; | ||||||
|  |       default = {}; | ||||||
|  |       example = { | ||||||
|  |         userDictPath = ""; | ||||||
|  |         workspaceDictPath = ""; | ||||||
|  |         fileDictPath = ""; | ||||||
|  |         linters = { | ||||||
|  |           BoringWords = true; | ||||||
|  |           PossessiveNoun = true; | ||||||
|  |           SentenceCapitalization = false; | ||||||
|  |           SpellCheck = false; | ||||||
|  |         }; | ||||||
|  |         codeActions = { | ||||||
|  |           ForceStable = false; | ||||||
|  |         }; | ||||||
|  |         markdown = { | ||||||
|  |           IgnoreLinkTitle = false; | ||||||
|  |         }; | ||||||
|  |         diagnosticSeverity = "hint"; | ||||||
|  |         isolateEnglish = false; | ||||||
|  |         dialect = "American"; | ||||||
|  |         maxFileLength = 120000; | ||||||
|  |         ignoredLintsPath = {}; | ||||||
|  |       }; | ||||||
|  |       description = "Settings to pass to harper-ls"; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 gmvar
				gmvar