nvim: cleanup lua files style inconsistencies

This commit is contained in:
saibotk 2022-02-23 00:18:26 +01:00
parent 3fe606b90f
commit 47fdfe1d06
Signed by: saibotk
GPG key ID: 67585F0065E261D5
4 changed files with 61 additions and 61 deletions

View file

@ -1,4 +1,4 @@
local nvim_config_root = "~/.config/nvim" local nvim_config_root = '~/.config/nvim'
-- BASIC OPTIONS -- BASIC OPTIONS
require('plugins') require('plugins')
@ -6,7 +6,7 @@ require('options')
require('mappings') require('mappings')
-- VIM PLUGIN OPTIONS -- VIM PLUGIN OPTIONS
vim.cmd("source " .. nvim_config_root .. "/pluginoptions.vim") vim.cmd('source ' .. nvim_config_root .. '/pluginoptions.vim')
-- LUA PLUGIN OPTIONS -- LUA PLUGIN OPTIONS
require('telescopeconfig') require('telescopeconfig')

View file

@ -4,7 +4,7 @@ local cmp = require'cmp'
cmp.setup({ cmp.setup({
snippet = { snippet = {
expand = function(args) expand = function(args)
vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. vim.fn['UltiSnips#Anon'](args.body) -- For `ultisnips` users.
end, end,
}, },
mapping = { mapping = {
@ -49,21 +49,21 @@ local on_attach = function(client, bufnr)
end end
local opts = { noremap = true, silent = true } local opts = { noremap = true, silent = true }
buf_set_keymap("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) buf_set_keymap('n', 'gd', '<cmd>Telescope lsp_definitions<CR>', opts)
buf_set_keymap("n", "gh", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) buf_set_keymap('n', 'gh', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap("n", "gD", "<cmd>Telescope lsp_implementations<CR>", opts) buf_set_keymap('n', 'gD', '<cmd>Telescope lsp_implementations<CR>', opts)
buf_set_keymap("n", "gs", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts) buf_set_keymap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap("n", "gR", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) buf_set_keymap('n', 'gR', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap("n", "gH", "<cmd>Telescope lsp_code_actions()<CR>", opts) buf_set_keymap('n', 'gH', '<cmd>Telescope lsp_code_actions()<CR>', opts)
buf_set_keymap("n", "gr", "<cmd>Telescope lsp_references<CR>", opts) buf_set_keymap('n', 'gr', '<cmd>Telescope lsp_references<CR>', opts)
buf_set_keymap("n", "ge", "<cmd>lua vim.diagnostic.open_float()<CR>", opts) buf_set_keymap('n', 'ge', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
end end
local lsp_installer = require "nvim-lsp-installer" local lsp_installer = require 'nvim-lsp-installer'
lsp_installer.on_server_ready(function(server) lsp_installer.on_server_ready(function(server)
local opts = {} local opts = {}
opts.on_attach = on_attach opts.on_attach = on_attach
opts.capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()) opts.capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
server:setup(opts) server:setup(opts)
vim.cmd [[ do User LspAttachBuffers ]] vim.cmd [[ do User LspAttachBuffers ]]

View file

@ -4,33 +4,33 @@ vim.g.nvim_tree_icons = {
default = '', default = '',
symlink = '', symlink = '',
git = { git = {
unstaged = "", unstaged = '',
staged = "", staged = '',
unmerged = "", unmerged = '',
renamed = "", renamed = '',
untracked = "", untracked = '',
deleted = "", deleted = '',
}, },
folder = { folder = {
default = "", default = '',
open = "", open = '',
empty = "", empty = '',
empty_open = "", empty_open = '',
symlink = "", symlink = '',
symlink_open = "", symlink_open = '',
}, },
} }
-- extra options -- extra options
vim.g.nvim_tree_indent_markers=1 vim.g.nvim_tree_indent_markers = 1
vim.g.nvim_tree_add_trailing=1 vim.g.nvim_tree_add_trailing = 1
vim.g.nvim_tree_special_files= { vim.g.nvim_tree_special_files = {
["README.md"] = true, ['README.md'] = true,
["readme.md"] = true, ['readme.md'] = true,
Pipfile = true, Pipfile = true,
Makefile = true, Makefile = true,
["package.json"] = true, ['package.json'] = true,
} }
-- colors -- colors
@ -57,7 +57,7 @@ require'nvim-tree'.setup {
auto_open = true, auto_open = true,
}, },
system_open = { system_open = {
cmd = "open" cmd = 'open'
}, },
filters = { filters = {
dotfiles = true dotfiles = true
@ -74,6 +74,6 @@ require'nvim-tree'.setup {
}, },
}, },
trash = { trash = {
cmd = "trash" cmd = 'trash'
} }
} }

View file

@ -10,45 +10,45 @@ vim.cmd [[
]] ]]
-- color settings -- color settings
vim.opt.termguicolors=true vim.opt.termguicolors = true
-- random settings -- random settings
vim.opt.number=true vim.opt.number = true
vim.opt.rnu=true vim.opt.rnu = true
vim.opt.clipboard='unnamed' vim.opt.clipboard = 'unnamed'
vim.opt.mouse='nvi' vim.opt.mouse = 'nvi'
vim.opt.visualbell=true vim.opt.visualbell = true
vim.opt.virtualedit='block' vim.opt.virtualedit = 'block'
vim.opt.scrolloff=1 vim.opt.scrolloff = 1
vim.opt.wildmenu=true vim.opt.wildmenu = true
vim.opt.autoread=true vim.opt.autoread = true
vim.opt.lazyredraw=true vim.opt.lazyredraw = true
vim.opt.history=250 vim.opt.history = 250
vim.opt.showmode=false vim.opt.showmode = false
vim.opt.completeopt='menuone,noinsert,noselect' vim.opt.completeopt = 'menuone,noinsert,noselect'
-- tabs and line wrap -- tabs and line wrap
vim.opt.wrapmargin=8 vim.opt.wrapmargin = 8
vim.opt.backspace='indent,eol,start' vim.opt.backspace = 'indent,eol,start'
vim.opt.encoding='utf-8' vim.opt.encoding = 'utf-8'
vim.opt.autoindent=true vim.opt.autoindent = true
-- search -- search
vim.opt.incsearch=true vim.opt.incsearch = true
vim.opt.hlsearch=true vim.opt.hlsearch = true
vim.opt.smartcase=true vim.opt.smartcase = true
-- Disable Backup and Swap files -- Disable Backup and Swap files
vim.opt.swapfile=false vim.opt.swapfile = false
vim.opt.backup=false vim.opt.backup = false
vim.opt.writebackup=false vim.opt.writebackup = false
-- setup split -- setup split
vim.opt.splitbelow=true vim.opt.splitbelow = true
vim.opt.splitright=true vim.opt.splitright = true
-- Enable folding -- Enable folding
vim.opt.foldmethod='indent' vim.opt.foldmethod = 'indent'
vim.opt.foldlevel=99 vim.opt.foldlevel = 99