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
require('plugins')
@ -6,7 +6,7 @@ require('options')
require('mappings')
-- VIM PLUGIN OPTIONS
vim.cmd("source " .. nvim_config_root .. "/pluginoptions.vim")
vim.cmd('source ' .. nvim_config_root .. '/pluginoptions.vim')
-- LUA PLUGIN OPTIONS
require('telescopeconfig')

View file

@ -4,7 +4,7 @@ local cmp = require'cmp'
cmp.setup({
snippet = {
expand = function(args)
vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
vim.fn['UltiSnips#Anon'](args.body) -- For `ultisnips` users.
end,
},
mapping = {
@ -49,21 +49,21 @@ local on_attach = function(client, bufnr)
end
local opts = { noremap = true, silent = true }
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", "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", "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", "gr", "<cmd>Telescope lsp_references<CR>", opts)
buf_set_keymap("n", "ge", "<cmd>lua vim.diagnostic.open_float()<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', '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', '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', 'gr', '<cmd>Telescope lsp_references<CR>', opts)
buf_set_keymap('n', 'ge', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
end
local lsp_installer = require "nvim-lsp-installer"
local lsp_installer = require 'nvim-lsp-installer'
lsp_installer.on_server_ready(function(server)
local opts = {}
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)
vim.cmd [[ do User LspAttachBuffers ]]

View file

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

View file

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