add lisp editing and autopairs
This commit is contained in:
		
							parent
							
								
									630069f732
								
							
						
					
					
						commit
						f446839a3f
					
				| 
						 | 
					@ -0,0 +1,15 @@
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
						"windwp/nvim-autopairs",
 | 
				
			||||||
 | 
						-- Optional dependency
 | 
				
			||||||
 | 
						dependencies = { 'hrsh7th/nvim-cmp' },
 | 
				
			||||||
 | 
						config = function()
 | 
				
			||||||
 | 
							require("nvim-autopairs").setup {}
 | 
				
			||||||
 | 
							-- If you want to automatically add `(` after selecting a function or method
 | 
				
			||||||
 | 
							local cmp_autopairs = require('nvim-autopairs.completion.cmp')
 | 
				
			||||||
 | 
							local cmp = require('cmp')
 | 
				
			||||||
 | 
							cmp.event:on(
 | 
				
			||||||
 | 
								'confirm_done',
 | 
				
			||||||
 | 
								cmp_autopairs.on_confirm_done()
 | 
				
			||||||
 | 
							)
 | 
				
			||||||
 | 
						end,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,31 @@
 | 
				
			||||||
 | 
					local lisp_dialects = { "clojure", "fennel", "scheme", "lisp" }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							"gpanders/nvim-parinfer",
 | 
				
			||||||
 | 
							ft = { unpack(lisp_dialects) },
 | 
				
			||||||
 | 
							init = function()
 | 
				
			||||||
 | 
								vim.g.parinfer_force_balance = true
 | 
				
			||||||
 | 
								vim.g.parinfer_comment_chars = ";;"
 | 
				
			||||||
 | 
							end,
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							"Olical/conjure",
 | 
				
			||||||
 | 
							ft = { unpack(lisp_dialects) },
 | 
				
			||||||
 | 
							init = function()
 | 
				
			||||||
 | 
								vim.api.nvim_create_autocmd("BufNewFile", {
 | 
				
			||||||
 | 
									group = vim.api.nvim_create_augroup("conjure_log_disable_lsp", { clear = true }),
 | 
				
			||||||
 | 
									pattern = { "conjure-log-*" },
 | 
				
			||||||
 | 
									callback = function() vim.diagnostic.disable(0) end,
 | 
				
			||||||
 | 
									desc = "Conjure Log disable LSP diagnostics",
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								vim.api.nvim_create_autocmd("FileType", {
 | 
				
			||||||
 | 
									group = vim.api.nvim_create_augroup("comment_config", { clear = true }),
 | 
				
			||||||
 | 
									pattern = { "clojure" },
 | 
				
			||||||
 | 
									callback = function() vim.bo.commentstring = ";; %s" end,
 | 
				
			||||||
 | 
									desc = "Lisp style line comment",
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							end,
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue