Move python config into options, add keymap to format with black and zimports

This commit is contained in:
Evie Litherland-Smith 2022-11-03 11:29:01 +00:00
parent cfabd294fb
commit 65f7631912
4 changed files with 11 additions and 10 deletions

View file

@ -1,3 +1,6 @@
-- Set vim options
require 'options'
-- Load plugins as defined for Packer -- Load plugins as defined for Packer
require 'plugins' require 'plugins'
@ -7,8 +10,5 @@ require 'keymaps'
-- Setup LSP configuration -- Setup LSP configuration
require 'config_lsp' require 'config_lsp'
-- Set additional vim.opt variables
require 'options'
-- Remaining vim commands to be converted to lua -- Remaining vim commands to be converted to lua
require 'vimcommands' require 'vimcommands'

View file

@ -1,7 +0,0 @@
vim.g.python3_host_prog = '~/.pyenv/versions/neovim3/bin/python'
vim.g.python_indent = {
open_paren = 'shiftwidth()',
nested_paren = 'shiftwidth()',
continue = 'shiftwidth()',
closed_paren_align_last_line = 'v:false',
}

View file

@ -17,6 +17,7 @@ nmap('<leader>sr', ':SnipRun<cr>')
nmap('<leader>gf', ':Git fetch<cr>') nmap('<leader>gf', ':Git fetch<cr>')
nmap('<leader>gp', ':Git pull<cr>') nmap('<leader>gp', ':Git pull<cr>')
nmap('<leader>gP', ':Git push<cr>') nmap('<leader>gP', ':Git push<cr>')
nmap('<leader>i', ':!black % ; zimports %<cr>')
-- Telescope -- Telescope
nmap('<leader>;', '<cmd>Telescope builtin<cr>') nmap('<leader>;', '<cmd>Telescope builtin<cr>')

View file

@ -1,3 +1,10 @@
vim.g.python3_host_prog = '~/.pyenv/versions/neovim3/bin/python'
vim.g.python_indent = {
open_paren = 'shiftwidth()',
nested_paren = 'shiftwidth()',
continue = 'shiftwidth()',
closed_paren_align_last_line = 'v:false',
}
vim.opt.mouse="nv" vim.opt.mouse="nv"
vim.opt.shiftwidth=4 vim.opt.shiftwidth=4
vim.opt.number=true vim.opt.number=true