diff --git a/lua/keybinds.lua b/lua/keybinds.lua index e52dc78..5944a80 100644 --- a/lua/keybinds.lua +++ b/lua/keybinds.lua @@ -1,5 +1,5 @@ local map = vim.api.nvim_set_keymap -vim.g.mapleader = " " +vim.g.mapleader = ' ' map('n', 'a', 'ggVG', { noremap = true, silent = true }) map('i', '', 'ggVG', { noremap = true, silent = true }) map('v', 'c', 'y', { noremap = true, silent = true }) diff --git a/lua/plugins/lines.lua b/lua/plugins/lines.lua index e16dc9e..0acf330 100644 --- a/lua/plugins/lines.lua +++ b/lua/plugins/lines.lua @@ -53,13 +53,15 @@ require('cokeline').setup({ fg = get_hex('Comment', 'fg'), bg = get_hex('Background', 'bg'), },--]] - fg = function (buffer) + fg = function(buffer) if buffer.is_focused then return get_hex('Normal', 'fg') end return get_hex('Comment', 'fg') end, - bg = function(_) return get_hex('Background', 'bg') end + bg = function(_) + return get_hex('Background', 'bg') + end, }, components = { diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 7016f3e..8cad671 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,8 +1,8 @@ --INFO: Setup various LSP servers, and completion engines --TODO: use nvim-lsp-installer? -local cmp = require('cmp') +local cmp = require('cmp') local lspconfig = require('lspconfig') -local configs = require('lspconfig.configs') +local configs = require('lspconfig.configs') cmp.setup({ snippet = { @@ -33,24 +33,24 @@ local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protoco if not configs.astrols then configs.astrols = { default_config = { - cmd = {'astro-ls', '--stdio'}, - filetypes = {'astro'}, + cmd = { 'astro-ls', '--stdio' }, + filetypes = { 'astro' }, root_dir = function(fname) return lspconfig.util.find_node_modules_ancestor(fname) end, init_options = { astro = { enabled = true, - diagnostics = {enabled = true}, - rename = {enabled = true}, - format = {enabled = true}, - completions = {enabled = true}, - hover = {enabled = true}, - codeActions = {enabled = true}, - selectionRange = {enabled = true}, - } + diagnostics = { enabled = true }, + rename = { enabled = true }, + format = { enabled = true }, + completions = { enabled = true }, + hover = { enabled = true }, + codeActions = { enabled = true }, + selectionRange = { enabled = true }, + }, }, - } + }, } end @@ -81,23 +81,23 @@ require('lspconfig').zls.setup({ }) local function arrayHasVal(tab, val) - for index, value in ipairs(tab) do - if value == val then - return true - end - end + for index, value in ipairs(tab) do + if value == val then + return true + end + end - return false + return false end local checkTsDiagnosticsCodes = function(_, _, params, client_id, _, config) - local codesToIgnore = {8010, 8011} + local codesToIgnore = { 8010, 8011 } if params.diagnostics ~= nil then local idx = 1 while idx <= #params.diagnostics do if arrayHasVal(codesToIgnore, params.diagnostics[idx].code) then table.remove(params.diagnostics, idx) else - idx = idx+1 + idx = idx + 1 end end vim.lsp.diagnostic.on_publish_diagnostics(_, _, params, client_id, _, config) @@ -108,7 +108,7 @@ end --}) require('lspconfig').flow.setup({ - cmd = {"flow", "lsp"}, + cmd = { 'flow', 'lsp' }, capabilities = capabilities, }) diff --git a/lua/plugins/misc.lua b/lua/plugins/misc.lua index 76f2393..5a31d07 100644 --- a/lua/plugins/misc.lua +++ b/lua/plugins/misc.lua @@ -2,7 +2,7 @@ require('filetype').setup({ overrides = { extensions = { v = 'vlang', - astro = 'astro' + astro = 'astro', }, }, })