Added .luarc.json to get rid of warnings about missing global vim object

This commit is contained in:
2024-09-19 22:02:29 +02:00
parent eddedb0da9
commit 0b3ea1098a
3 changed files with 14 additions and 3 deletions

3
.luarc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"diagnostics.globals": ["vim"],
}

View File

@@ -19,7 +19,6 @@ require('mason-lspconfig').setup({
'gopls',
'pylsp',
'clangd',
-- 'volar',
},
})

View File

@@ -1,3 +1,10 @@
---------------------------------------------------
--
-- Some general setup taken from some tutorial
-- which I have forgotten
--
--------------------------------------------------
-- Hint: use `:h <option>` to figure out the meaning if needed
vim.opt.clipboard = 'unnamedplus' -- use system clipboard
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
@@ -5,7 +12,7 @@ vim.opt.mouse = 'a' -- allow the mouse to be used in Nvim
-- Tab
vim.opt.tabstop = 2 -- number of visual spaces per TAB
vim.opt.softtabstop = 2 -- number of spacesin tab when editing
vim.opt.softtabstop = 2 -- number of spaces in tab when editing
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
@@ -15,7 +22,7 @@ vim.opt.relativenumber = false -- add numbers to each line on the left side
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
-- vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
vim.opt.termguicolors = true -- enable 24-bit RGB color in the TUI
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
-- Searching
@@ -30,9 +37,11 @@ vim.opt.smartcase = true -- but make it case sensitive if an uppercase is enter
-- General text editing and cursor movements
--
--------------------------------------------------
-- Wrapping movements and long lines
vim.opt.whichwrap = "b,s,<,>,[,]" -- wrap backspace, space and left-right cursor keys
vim.opt.wrap = false
-- Spelling
vim.opt.spell = true
vim.opt.spelllang = "de,en"