[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 local g = vim.g
opt.formatoptions = "trq1jp" opt.formatoptions = "trq1jp"
opt.tabstop = 4

View File

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

View File

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

View File

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

View File

@ -55,7 +55,8 @@ local enhance_server_opts = {
opts.settings = { opts.settings = {
Lua = { Lua = {
runtime = { 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', version = 'LuaJIT',
-- Setup your lua path -- Setup your lua path
path = runtime_path, path = runtime_path,
@ -73,7 +74,8 @@ local enhance_server_opts = {
library = library =
vim.api.nvim_get_runtime_file("", true), 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 = { telemetry = {
enable = false, enable = false,
}, },

View File

@ -45,8 +45,9 @@ return require("packer").startup(function()
{ {
"nvim-lua/plenary.nvim", "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 -- autopairs
use { use {
"windwp/nvim-autopairs", "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 end
local function process_diagnostics(prefix, n, hl) local function process_diagnostics(prefix, n, hl)
if n > 0 then if n > 0 then
return hl .. prefix .. n return hl .. prefix .. n
else else
return "" return ""
end end
end end
local function spell_check() local function spell_check()
if vim.wo.spell then if vim.wo.spell then
local lang = vim.o.spelllang local lang = vim.o.spelllang
return "[SPELL=" .. lang .. "]" return "[SPELL=" .. lang .. "]"
else else
return "" return ""
end end
end end
local function statusline_focused() local function statusline_focused()
local diagnostics = get_lsp_diagnostics() local diagnostics = get_lsp_diagnostics()
local mode = vim.fn.mode() local mode = vim.fn.mode()
local mg = get_mode(mode) local mg = get_mode(mode)
local accent_color = get_mode_color(mg) 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(accent_color, {get_mode_display_name(mg)}),
gen_section("%#Middle#", {"%f"}), gen_section("%#Middle#", {"%f"}),
gen_section("%#Bottom#", {"%m", "%r"}), gen_section("%#Bottom#", {"%m", "%r"}),
@ -167,8 +167,8 @@ local function statusline_focused()
) )
} }
) )
} }
local right = table.concat { local right = table.concat {
gen_section( gen_section(
"%#Bottom#", "%#Bottom#",
{ {
@ -178,14 +178,14 @@ local function statusline_focused()
), ),
gen_section("%#Middle#", {"%03.p%%"}), gen_section("%#Middle#", {"%03.p%%"}),
gen_section("%#Top#", {"-%03.c-"}) gen_section("%#Top#", {"-%03.c-"})
} }
return table.concat { return table.concat {
left, left,
"%#Statusline#", "%#Statusline#",
"%=", "%=",
right right
} }
end end