fix spaces
As it turns out, you not confused with tabs and spaces settings. And in some editors it's has some stange, kinda weird optins e.g "shiftwidth", "tabstop", and "expandtab" (inserting spaces). Kinda weird and I don't understand why?
This commit is contained in:
parent
fd509a515b
commit
83d0eff656
3 changed files with 242 additions and 240 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.json
|
|
@ -5,20 +5,21 @@ local g = vim.g
|
|||
-- Set the numbers of whitespace characters when shifting with "<" or ">".
|
||||
-- In fact, in spite of expandtab, the terminal still displays whitespace charaters,
|
||||
-- so let's set the number of whitespace characters for ones press of these buttons.
|
||||
opt.shiftwidth = 2
|
||||
opt.shiftwidth = 4
|
||||
|
||||
-- one tab == two whitespace characters in new line.
|
||||
-- Pressing <CR> will insert tabs. Tabs are drawn as whitespace.
|
||||
-- that's why we have to set that each tab on a new line is two whitespace.
|
||||
opt.tabstop = 2
|
||||
opt.tabstop = 4
|
||||
|
||||
-- Adjust new line to the previous indentation
|
||||
-- Adjust new line to the previous indentation.
|
||||
opt.smartindent = true
|
||||
|
||||
opt.expandtab = false
|
||||
-- On pressing tab, insert 4 spaces.
|
||||
opt.expandtab = true
|
||||
opt.smarttab = true
|
||||
opt.scrolloff = 8
|
||||
|
||||
-- Show unprintable
|
||||
-- Show unprintable.
|
||||
opt.list = true
|
||||
opt.listchars = {tab = '⁞ ', eol = '¬', trail = '·'}
|
||||
|
|
|
@ -87,8 +87,8 @@ require('lazy').setup({
|
|||
config = function()
|
||||
-- Setup language servers.
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.clangd.setup {}
|
||||
lspconfig.neocmake.setup {}
|
||||
--lspconfig.clangd.setup {}
|
||||
--lspconfig.neocmake.setup {}
|
||||
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
|
@ -214,9 +214,9 @@ require('lazy').setup({
|
|||
-- Set up lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
-- TODO Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
||||
require('lspconfig')['clangd'].setup {
|
||||
--[[require('lspconfig')['clangd'].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
}--]]
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue