summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaminou <[email protected]>2021-07-02 18:42:48 +0100
committerGitHub <[email protected]>2021-07-02 13:42:48 -0400
commitd58b79b320e76e372561b3318b984c9511b516d5 (patch)
tree02bae9b48e923e18202126c0f369460fbf42dbde
parent643003a0a4e326db817aeb438b0506d236b3ff7a (diff)
Some lua touches (#587)
* a way with lua!! * some! not all ;-( * shortmess
-rw-r--r--lua/colorscheme.lua4
-rw-r--r--lua/settings.lua12
2 files changed, 8 insertions, 8 deletions
diff --git a/lua/colorscheme.lua b/lua/colorscheme.lua
index 789363d8..6e26b9bf 100644
--- a/lua/colorscheme.lua
+++ b/lua/colorscheme.lua
@@ -1,2 +1,2 @@
--- TODO is there a lua native way to do this?
-vim.cmd('colorscheme ' .. O.colorscheme)
+vim.g.colors_name = O.colorscheme
+vim.g.syntax = true
diff --git a/lua/settings.lua b/lua/settings.lua
index 85682cb2..4aaad357 100644
--- a/lua/settings.lua
+++ b/lua/settings.lua
@@ -1,5 +1,5 @@
-vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object"
-vim.cmd('set shortmess+=c') -- Don't pass messages to |ins-completion-menu|.
+vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object"
+vim.opt.shortmess:append("c") -- Don't pass messages to |ins-completion-menu|.
vim.cmd('set inccommand=split') -- Make substitution work in realtime
vim.o.hidden = O.hidden_files -- Required to keep multiple buffers open multiple buffers
vim.o.title = true
@@ -8,7 +8,6 @@ vim.cmd('let &titleold="'..TERMINAL..'"')
vim.o.titlestring="%<%F%=%l/%L - nvim"
vim.wo.wrap = O.wrap_lines -- Display long lines as just one line
vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
-vim.cmd('syntax on') -- syntax highlighting
vim.o.pumheight = 10 -- Makes popup menu smaller
vim.o.fileencoding = "utf-8" -- The encoding written to file
vim.o.cmdheight = 2 -- More space for displaying messages
@@ -19,9 +18,10 @@ vim.o.termguicolors = true -- set term gui colors most terminals support this
vim.o.splitright = true -- Vertical splits will automatically be to the right
-- vim.o.t_Co = "256" -- Support 256 colors
vim.o.conceallevel = 0 -- So that I can see `` in markdown files
-vim.cmd('set ts=4') -- Insert 2 spaces for a tab
-vim.cmd('set sw=4') -- Change the number of space characters inserted for indentation
-vim.cmd('set expandtab') -- Converts tabs to spaces
+vim.opt.tabstop = 4 -- Insert 2 spaces for a tab
+vim.opt.shiftwidth = 4 -- Change the number of space characters inserted for indentation
+--vim.opt.softtabstop = 4
+vim.opt.expandtab = true -- Converts tabs to spaces
vim.o.completeopt = "menuone,noselect"
vim.bo.smartindent = true -- Makes indenting smart
vim.wo.number = O.number -- set numbered lines