nvimdev/dope

autoindent for python

notwidow opened this issue · 3 comments

Hi, There is an issue from start with cosynvim .. whenever i create a list in python it auto adds 8 spaces instead of 4 in lists... how to make it 4..?
create a .py file and code lis = [] and then hit enter between square brackets and it will be indented 8 spaces.. thanks

@notwidow Add the following code to the ./after/ftplugin/python.lua path

vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
vim.opt_local.tabstop = 4

@notwidow Add the following code to the ./after/ftplugin/python.lua path

vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
vim.opt_local.tabstop = 4

no python.lua file

@notwidow Add the following code to the ./after/ftplugin/python.lua path

vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
vim.opt_local.tabstop = 4

no python.lua file

You have to create it in the path that it indicates you