From a649e15e92146fcd2adbdd01f8800f55de5090fd Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 28 Jun 2021 14:18:14 +0200 Subject: [PATCH] Update - Add php lang - Add lazygit conf - Reconf icons - Try fix --- configs/lazygit/config.yml | 3 +++ configs/nvim/lua/helpers.lua | 2 ++ configs/nvim/lua/options.lua | 2 +- configs/nvim/lua/plugins/init.lua | 1 + configs/nvim/lua/plugins/lspconfig/init.lua | 1 + configs/nvim/lua/plugins/lspconfig/php.lua | 7 +++++++ configs/nvim/lua/plugins/web-devicons.lua | 12 ++++++++++++ 7 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 configs/lazygit/config.yml create mode 100644 configs/nvim/lua/plugins/lspconfig/php.lua create mode 100644 configs/nvim/lua/plugins/web-devicons.lua diff --git a/configs/lazygit/config.yml b/configs/lazygit/config.yml new file mode 100644 index 0000000..e3679f8 --- /dev/null +++ b/configs/lazygit/config.yml @@ -0,0 +1,3 @@ +git: + pull: + mode: 'rebase' # one of 'auto' | 'merge' | 'rebase' | 'ff-only', auto reads from git configuration \ No newline at end of file diff --git a/configs/nvim/lua/helpers.lua b/configs/nvim/lua/helpers.lua index c507093..4090abe 100644 --- a/configs/nvim/lua/helpers.lua +++ b/configs/nvim/lua/helpers.lua @@ -2,6 +2,7 @@ local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() local g = vim.g -- a table to access global variables local opt = vim.opt -- to set options +local o = vim.o -- to set options local function map(mode, lhs, rhs, opts) local options = {noremap = true} @@ -32,6 +33,7 @@ function get_helpers() fn = fn, g = g, opt = opt, + o = o, dump = dump, call_with_helpers = call_with_helpers, } diff --git a/configs/nvim/lua/options.lua b/configs/nvim/lua/options.lua index 1625e6d..8ebe9f9 100644 --- a/configs/nvim/lua/options.lua +++ b/configs/nvim/lua/options.lua @@ -14,7 +14,7 @@ local function init() opt.shiftwidth = 2 -- Size of an indent opt.sidescrolloff = 8 -- Columns of context opt.smartcase = true -- Do not ignore case with capitals - opt.smartindent = true -- Insert indents automatically + opt.autoindent = true -- Insert indents automatically opt.splitbelow = true -- Put new windows below current opt.splitright = true -- Put new windows right of current opt.tabstop = 2 -- Number of spaces tabs count for diff --git a/configs/nvim/lua/plugins/init.lua b/configs/nvim/lua/plugins/init.lua index 3ad733d..d15c736 100644 --- a/configs/nvim/lua/plugins/init.lua +++ b/configs/nvim/lua/plugins/init.lua @@ -2,6 +2,7 @@ function configure_packages() call_with_helpers(require('plugins.lspconfig').init) call_with_helpers(require('plugins.compe').init) call_with_helpers(require('plugins.nvim-treesitter').init) + call_with_helpers(require('plugins.web-devicons').init) end function install_packages() diff --git a/configs/nvim/lua/plugins/lspconfig/init.lua b/configs/nvim/lua/plugins/lspconfig/init.lua index 571297c..5c216b9 100644 --- a/configs/nvim/lua/plugins/lspconfig/init.lua +++ b/configs/nvim/lua/plugins/lspconfig/init.lua @@ -3,6 +3,7 @@ local function init() call_with_helpers(require('plugins.lspconfig.rust').init) call_with_helpers(require('plugins.lspconfig.typescript').init) call_with_helpers(require('plugins.lspconfig.ruby').init) + call_with_helpers(require('plugins.lspconfig.php').init) end return { diff --git a/configs/nvim/lua/plugins/lspconfig/php.lua b/configs/nvim/lua/plugins/lspconfig/php.lua new file mode 100644 index 0000000..cba5eaa --- /dev/null +++ b/configs/nvim/lua/plugins/lspconfig/php.lua @@ -0,0 +1,7 @@ +local function init() + require'lspconfig'.phpactor.setup{} +end + +return { + init = init +} \ No newline at end of file diff --git a/configs/nvim/lua/plugins/web-devicons.lua b/configs/nvim/lua/plugins/web-devicons.lua new file mode 100644 index 0000000..77e6749 --- /dev/null +++ b/configs/nvim/lua/plugins/web-devicons.lua @@ -0,0 +1,12 @@ +local function init() + require'nvim-web-devicons'.setup { + -- globally enable default icons (default to false) + -- will get overriden by `get_icons` option + default = true; + } + require'nvim-web-devicons'.get_icons() +end + +return { + init = init +} \ No newline at end of file