Move python config into options, add keymap to format with black and zimports
This commit is contained in:
parent
cfabd294fb
commit
65f7631912
6
init.lua
6
init.lua
|
@ -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'
|
||||||
|
|
|
@ -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',
|
|
||||||
}
|
|
|
@ -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>')
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue