You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a question.
How can I get smart indentation to work?
For example, I have the following variable:
letf= {}
When I hit enter, I get:
letf= {
}
Here's my settings.lua file:
localM= {}
M.load_default_options=function()
localutils=require("dvim.utils")
localjoin_paths=utils.join_pathslocalundodir=join_paths(get_cache_dir(), "undo")
ifnotutils.is_directory(undodir) thenvim.fn.mkdir(undodir, "p")
endlocaldefault_options= {
backup=false, -- creates a backup fileclipboard="unnamedplus", -- allows neovim to access the system clipboardcmdheight=2, -- more space in the neovim command line for displaying messagescompleteopt= { "menuone", "noselect" }, -- mostly just for cmpfileencoding="utf-8", -- the encoding written to a filehlsearch=true, -- highlight all matches on previous search patternignorecase=true, -- ignore case in search patternsmouse="a", -- allow the mouse to be used in neovimpumheight=10, -- pop up menu heightshowmode=false, -- we don't need to see things like -- INSERT -- anymoreshowtabline=2, -- always show tabssmarttab=true, -- <tab>/<BS> indent/dedent in leading whitespacesmartcase=true, -- smart casesmartindent=true, -- make indenting smarter againsplitbelow=true, -- force all horizontal splits to go below current windowsplitright=true, -- force all vertical splits to go to the right of current windowswapfile=false, -- creates a swapfiletimeoutlen=500, -- time to wait for a mapped sequence to complete (in milliseconds)undofile=true, -- enable persistent undoupdatetime=300, -- faster completion (4000ms default)writebackup=false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be editednumber=true, -- set numbered linesrelativenumber=true, -- set relative numbered linesnumberwidth=2, -- set number column width to 2 {default 4}tabstop=2, -- spaces per tabshiftwidth=2, -- spaces per tabexpandtab=true, -- spaces per tabsigncolumn="yes", -- always show the sign column, otherwise it would shift the text each timewrap=false, -- don't display lines as one long linescrolloff=8, -- scroll when you are 8 lines away from the top/bottomcursorline=true, -- highlight the current line-- spell = true, -- turn on spell check
}
--- SETTINGS ---vim.opt.shortmess:append("c") -- don't show redundant messages from ins-completion-menuvim.opt.shortmess:append("I") -- don't show the default intro messagevim.opt.whichwrap:append("<,>,[,],h,l")
fork, vinpairs(default_options) dovim.opt[k] =vendendM.load_headless_options=function()
vim.opt.shortmess="" -- try to prevent echom from cutting messages off or promptingvim.opt.more=false-- don't pause listing when screen is filledvim.opt.cmdheight=9999-- helps avoiding |hit-enter| prompts.vim.opt.columns=9999-- set the widest screen possiblevim.opt.swapfile=false-- don't use a swap fileendM.load_defaults=function()
if#vim.api.nvim_list_uis() ==0thenM.load_headless_options()
returnendM.load_default_options()
endreturnM
The text was updated successfully, but these errors were encountered:
This is just a question.
How can I get smart indentation to work?
For example, I have the following variable:
When I hit enter, I get:
Here's my
settings.lua
file:The text was updated successfully, but these errors were encountered: