[nvim] format: tabstop=8 -> 4 for lua files

This commit is contained in:
David JULIEN 2022-04-27 21:58:12 +02:00
parent bc67eb8ffe
commit d9e7f76a5f
13 changed files with 593 additions and 591 deletions

View File

@ -7,3 +7,4 @@ local opt = vim.opt
local g = vim.g
opt.formatoptions = "trq1jp"
opt.tabstop = 4

View File

@ -5,7 +5,6 @@
local opt = vim.opt
local g = vim.g
opt.formatoptions = "trq1jp"
opt.tabstop = 4

View File

@ -6,8 +6,6 @@
local M = {} -- The module to export
M = {
lsp_path = vim.fn.stdpath("data").. "/lsp",
-- misc
sign_error = "",
sign_warning = "",

View File

@ -26,7 +26,8 @@ vim.keymap.set("n", "<leader>fl",
function() require("telescope.builtin").live_grep() end)
-- colorscheme
vim.keymap.set("n", "<C-s>", function() require("astronomy").toggle_variant() end)
vim.keymap.set("n", "<C-s>",
function() require("astronomy").toggle_variant() end)
-- snippets
vim.keymap.set({ "i", "s" }, "<C-E>", "<Plug>luasnip-next-choice")

View File

@ -55,7 +55,8 @@ local enhance_server_opts = {
opts.settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
-- Tell the language server which version of Lua you're
-- using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = runtime_path,
@ -73,7 +74,8 @@ local enhance_server_opts = {
library =
vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
-- Do not send telemetry data containing a randomized but
-- unique identifier
telemetry = {
enable = false,
},

View File

@ -45,8 +45,9 @@ return require("packer").startup(function()
{
"nvim-lua/plenary.nvim",
},
{'nvim-telescope/telescope-fzf-native.nvim',
run = 'make'
{
"nvim-telescope/telescope-fzf-native.nvim",
run = "make"
}
},
}
@ -92,7 +93,7 @@ return require("packer").startup(function()
-- autopairs
use {
"windwp/nvim-autopairs",
config = function() require('nvim-autopairs').setup() end
config = function() require("nvim-autopairs").setup() end
}

View File

@ -121,29 +121,29 @@ local function get_lsp_diagnostics(bufnr)
end
local function process_diagnostics(prefix, n, hl)
if n > 0 then
if n > 0 then
return hl .. prefix .. n
else
else
return ""
end
end
end
local function spell_check()
if vim.wo.spell then
if vim.wo.spell then
local lang = vim.o.spelllang
return "[SPELL=" .. lang .. "]"
else
else
return ""
end
end
end
local function statusline_focused()
local diagnostics = get_lsp_diagnostics()
local mode = vim.fn.mode()
local mg = get_mode(mode)
local accent_color = get_mode_color(mg)
local diagnostics = get_lsp_diagnostics()
local mode = vim.fn.mode()
local mg = get_mode(mode)
local accent_color = get_mode_color(mg)
local left = table.concat {
local left = table.concat {
gen_section(accent_color, {get_mode_display_name(mg)}),
gen_section("%#Middle#", {"%f"}),
gen_section("%#Bottom#", {"%m", "%r"}),
@ -167,8 +167,8 @@ local function statusline_focused()
)
}
)
}
local right = table.concat {
}
local right = table.concat {
gen_section(
"%#Bottom#",
{
@ -178,14 +178,14 @@ local function statusline_focused()
),
gen_section("%#Middle#", {"%03.p%%"}),
gen_section("%#Top#", {"-%03.c-"})
}
}
return table.concat {
return table.concat {
left,
"%#Statusline#",
"%=",
right
}
}
end