trying out null-ls
maybe have working black and mypy now??
This commit is contained in:
		
							parent
							
								
									bb54a114c2
								
							
						
					
					
						commit
						76906f1106
					
				|  | @ -59,8 +59,8 @@ let | |||
|     pynvim | ||||
|     six | ||||
|     python-lsp-server | ||||
|     # pylsp-mypy | ||||
|     pylint | ||||
|     python-lsp-black | ||||
|     pylsp-mypy | ||||
|     black | ||||
|     # other python packages you want | ||||
|   ]; | ||||
|  | @ -413,6 +413,26 @@ in | |||
|       } | ||||
|       cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({  map_char = { tex = ' ' } })) | ||||
| 
 | ||||
|       -- null-ls | ||||
|       local null_ls = require "null-ls" | ||||
|       local pyright = { | ||||
|         cmd = { "pyright" }, | ||||
|         filetypes = { "python", }, | ||||
|         debounce = 250, | ||||
|         debug = false, | ||||
|         default_timeout = 5000, | ||||
|         args = { "-p", "$FILENAME", "--skipunannotated" } | ||||
|       } | ||||
|       local sources = { | ||||
|         pyright, | ||||
|         null_ls.builtins.code_actions.statix, | ||||
|         null_ls.builtins.diagnostics.shellcheck, | ||||
|         -- null_ls.builtins.diagnostics.clj_kondo, | ||||
|         -- null_ls.builtins.formatting.black, | ||||
|         null_ls.builtins.code_actions.proselint, | ||||
|         -- null_ls.builtins.diagnostics.mypy, | ||||
|       } | ||||
| 
 | ||||
|       -- Setup lspconfig | ||||
|       require("lsp-format").setup {} | ||||
| 
 | ||||
|  | @ -421,10 +441,10 @@ in | |||
|       require('lspconfig').rnix.setup {on_attach = require "lsp-format".on_attach} | ||||
|       require('lspconfig').pylsp.setup {on_attach = require "lsp-format".on_attach, | ||||
|         settings = { | ||||
|           formatCommand = {"black"}, | ||||
|           pylsp = { | ||||
|             configurationSources = { "flake8", "mypy" }, | ||||
|             configurationSources = { "flake8", "mypy", "black" }, | ||||
|             plugins = { | ||||
|               black = {enabled = true}, | ||||
|               jedi_signature_help = {enabled = true}, | ||||
|               jedi_completion = { include_params = true }, | ||||
|               pylsp_mypy={ enabled = true }, | ||||
|  | @ -475,9 +495,9 @@ in | |||
|       } | ||||
| 
 | ||||
|       -- nvim-lint | ||||
|       require('lint').linters_by_ft = { | ||||
|         markdown = {'vale'}, | ||||
|       } | ||||
|       -- require('lint').linters_by_ft = { | ||||
|       --   markdown = {'vale'}, | ||||
|       -- } | ||||
| 
 | ||||
|       -- f_term | ||||
|       local map = vim.api.nvim_set_keymap | ||||
|  | @ -504,6 +524,10 @@ in | |||
|       terraform-lsp | ||||
|       clj-kondo | ||||
|       gcc | ||||
|       nodePackages.pyright | ||||
|       shellcheck | ||||
|       proselint | ||||
|       statix | ||||
|       # installs different langauge servers for neovim-lsp | ||||
|       # have a look on the link below to figure out the ones for your languages | ||||
|       # https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md | ||||
|  | @ -545,7 +569,8 @@ in | |||
|       vim-zettel | ||||
| 
 | ||||
|       # lsp stuff | ||||
|       nvim-lint | ||||
|       # nvim-lint | ||||
|       null-ls-nvim | ||||
|       nvim-lspconfig | ||||
|       nvim-cmp | ||||
|       cmp-nvim-lsp | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue