added pylsp servers & keymaps
This commit is contained in:
		
							parent
							
								
									b421d0ccaf
								
							
						
					
					
						commit
						220ff632e9
					
				
							
								
								
									
										19
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										19
									
								
								init.lua
								
								
								
								
							| 
						 | 
					@ -157,8 +157,15 @@ vim.opt.cursorline = true
 | 
				
			||||||
-- Minimal number of screen lines to keep above and below the cursor.
 | 
					-- Minimal number of screen lines to keep above and below the cursor.
 | 
				
			||||||
vim.opt.scrolloff = 10
 | 
					vim.opt.scrolloff = 10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--turn off virtual lines ect.
 | 
				
			||||||
 | 
					vim.diagnostic.config {
 | 
				
			||||||
 | 
					  virtual_text = false,
 | 
				
			||||||
 | 
					  virtual_lines = true,
 | 
				
			||||||
 | 
					  underline = false,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
--pull in remaps
 | 
					--pull in remaps
 | 
				
			||||||
require 'remap'
 | 
					--require 'remap'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- [[ Basic Autocommands ]]
 | 
					-- [[ Basic Autocommands ]]
 | 
				
			||||||
--  See `:help lua-guide-autocommands`
 | 
					--  See `:help lua-guide-autocommands`
 | 
				
			||||||
| 
						 | 
					@ -600,7 +607,6 @@ require('lazy').setup({
 | 
				
			||||||
        -- clangd = {},
 | 
					        -- clangd = {},
 | 
				
			||||||
        -- gopls = {},
 | 
					        -- gopls = {},
 | 
				
			||||||
        pylsp = {},
 | 
					        pylsp = {},
 | 
				
			||||||
        -- pyright = {},
 | 
					 | 
				
			||||||
        -- rust_analyzer = {},
 | 
					        -- rust_analyzer = {},
 | 
				
			||||||
        -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
 | 
					        -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
 | 
				
			||||||
        --
 | 
					        --
 | 
				
			||||||
| 
						 | 
					@ -771,18 +777,19 @@ require('lazy').setup({
 | 
				
			||||||
          -- Accept ([y]es) the completion.
 | 
					          -- Accept ([y]es) the completion.
 | 
				
			||||||
          --  This will auto-import if your LSP supports it.
 | 
					          --  This will auto-import if your LSP supports it.
 | 
				
			||||||
          --  This will expand snippets if the LSP sent a snippet.
 | 
					          --  This will expand snippets if the LSP sent a snippet.
 | 
				
			||||||
          ['<C-y>'] = cmp.mapping.confirm { select = true },
 | 
					          --['<C-y>'] = cmp.mapping.confirm { select = true },
 | 
				
			||||||
 | 
					          ['<C-Space>'] = cmp.mapping.confirm { select = true },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          -- If you prefer more traditional completion keymaps,
 | 
					          -- If you prefer more traditional completion keymaps,
 | 
				
			||||||
          -- you can uncomment the following lines
 | 
					          -- you can uncomment the following lines
 | 
				
			||||||
          --['<CR>'] = cmp.mapping.confirm { select = true },
 | 
					          --['<CR>'] = cmp.mapping.confirm { select = true },
 | 
				
			||||||
          --['<Tab>'] = cmp.mapping.select_next_item(),
 | 
					          --['<Tab>'] = cmp.mapping.confim(),
 | 
				
			||||||
          --['<S-Tab>'] = cmp.mapping.select_prev_item(),
 | 
					          --['<S-Tab>'] = cmp.mapping.select_prev_item(),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          -- Manually trigger a completion from nvim-cmp.
 | 
					          -- Manually trigger a completion from nvim-cmp.
 | 
				
			||||||
          --  Generally you don't need this, because nvim-cmp will display
 | 
					          --  Generally you don't need this, because nvim-cmp will display
 | 
				
			||||||
          --  completions whenever it has completion options available.
 | 
					          --  completions whenever it has completion options available.
 | 
				
			||||||
          ['<C-Space>'] = cmp.mapping.complete {},
 | 
					          --['<C-Space>'] = cmp.mapping.complete {},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          -- Think of <c-l> as moving to the right of your snippet expansion.
 | 
					          -- Think of <c-l> as moving to the right of your snippet expansion.
 | 
				
			||||||
          --  So if you have a snippet that's like:
 | 
					          --  So if you have a snippet that's like:
 | 
				
			||||||
| 
						 | 
					@ -923,7 +930,7 @@ require('lazy').setup({
 | 
				
			||||||
  --    This is the easiest way to modularize your config.
 | 
					  --    This is the easiest way to modularize your config.
 | 
				
			||||||
  --
 | 
					  --
 | 
				
			||||||
  --  Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
 | 
					  --  Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
 | 
				
			||||||
  -- { import = 'custom.plugins' },
 | 
					  { import = 'custom.plugins' },
 | 
				
			||||||
  --
 | 
					  --
 | 
				
			||||||
  -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
 | 
					  -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
 | 
				
			||||||
  -- Or use telescope!
 | 
					  -- Or use telescope!
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,3 +34,5 @@ vim.keymap.set('n', '<leader>o', '<C-w><C-k>', { desc = 'Move focus to the upper
 | 
				
			||||||
--split window maps
 | 
					--split window maps
 | 
				
			||||||
vim.keymap.set('n', '<leader>xs', ':close', { desc = 'Close current window' })
 | 
					vim.keymap.set('n', '<leader>xs', ':close', { desc = 'Close current window' })
 | 
				
			||||||
vim.keymap.set('n', '<leader>s', ':vsplit', { desc = 'Split window vertically' })
 | 
					vim.keymap.set('n', '<leader>s', ':vsplit', { desc = 'Split window vertically' })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return {}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue