From 4286c610562bb4dd9d288b47d60bdaf28a70438d Mon Sep 17 00:00:00 2001 From: "Vito G. Graffagnino" Date: Fri, 3 Jun 2022 19:46:30 +0100 Subject: Minor fixes --- init.lua | 3 --- lua/user/alpha.lua | 10 +++++----- lua/user/keymaps.lua | 5 +++-- lua/user/lua.lua | 4 +--- lua/user/plugins.lua | 26 +++++++++++--------------- 5 files changed, 20 insertions(+), 28 deletions(-) diff --git a/init.lua b/init.lua index 11c9089..cdb81a8 100644 --- a/init.lua +++ b/init.lua @@ -14,8 +14,5 @@ require "user.nvim-tree" require "user.bufferline" require "user.lualine" require "user.toggleterm" -require "user.project" -require "user.impatient" require "user.indentline" -require "user.alpha" require "user.whichkey" diff --git a/lua/user/alpha.lua b/lua/user/alpha.lua index 249a166..5530e52 100644 --- a/lua/user/alpha.lua +++ b/lua/user/alpha.lua @@ -22,18 +22,18 @@ dashboard.section.buttons.val = { dashboard.button("q", " Quit Neovim", ":qa"), } -local function footer() +-- local function footer() -- NOTE: requires the fortune-mod package to work -- local handle = io.popen("fortune") -- local fortune = handle:read("*a") -- handle:close() -- return fortune - return "chrisatmachine.com" -end +-- return "chrisatmachine.com" +-- end -dashboard.section.footer.val = footer() +-- dashboard.section.footer.val = footer() -dashboard.section.footer.opts.hl = "Type" +-- dashboard.section.footer.opts.hl = "Type" dashboard.section.header.opts.hl = "Include" dashboard.section.buttons.opts.hl = "Keyword" diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index 49087c7..027d526 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -28,8 +28,8 @@ keymap("n", "", "l", opts) -- Resize with arrows keymap("n", "", ":resize +2", opts) keymap("n", "", ":resize -2", opts) -keymap("n", "", ":vertical resize -2", opts) -keymap("n", "", ":vertical resize +2", opts) +keymap("n", "", ":vertical resize +2", opts) +keymap("n", "", ":vertical resize -2", opts) -- Navigate buffers keymap("n", "", ":bnext", opts) @@ -65,6 +65,7 @@ keymap("t", "", "l", term_opts) -- Nvimtree keymap("n", "e", ":NvimTreeToggle", opts) +keymap("n", "v", ":edit $MYVIMRC", opts) keymap("n", "f", ":Format", opts) -- keymap("n", "f", "Telescope find_files", opts) keymap("n", "f", "lua require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ previewer = false }))", opts) diff --git a/lua/user/lua.lua b/lua/user/lua.lua index c97c178..a37b3e7 100644 --- a/lua/user/lua.lua +++ b/lua/user/lua.lua @@ -12,8 +12,6 @@ local function dir_separator() -- Look at package.config for directory separator string (it's the first line) if package.config then return string.match(package.config, '^[^\n]') - elseif vim.fn.has('win32') == 1 then - return '\\' else return '/' end @@ -76,4 +74,4 @@ end -- Set options to open require with gf vim.opt_local.include = [=[\v<((do|load)file|require)\s*\(?['"]\zs[^'"]+\ze['"]]=] -vim.opt_local.includeexpr = "v:lua.find_required_path(v:fname)" \ No newline at end of file +vim.opt_local.includeexpr = "v:lua.find_required_path(v:fname)" diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index 7f2cb92..6008cd7 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -44,22 +44,18 @@ return packer.startup(function(use) use "wbthomason/packer.nvim" -- Have packer manage itself use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins - use "windwp/nvim-autopairs" -- Autopairs, integrates with both cmp and treesitter - use "numToStr/Comment.nvim" -- Easily comment stuff - use "akinsho/bufferline.nvim" - use "moll/vim-bbye" - use "nvim-lualine/lualine.nvim" use "akinsho/toggleterm.nvim" - use "ahmedkhalf/project.nvim" - use "lewis6991/impatient.nvim" - use "lukas-reineke/indent-blankline.nvim" - use 'goolord/alpha-nvim' + use "akinsho/bufferline.nvim" use "antoinemadec/FixCursorHold.nvim" -- This is needed to fix lsp doc highlight + use "folke/which-key.nvim" use 'kyazdani42/nvim-web-devicons' use 'kyazdani42/nvim-tree.lua' - use "goolord/alpha-nvim" - use "antoinemadec/FixCursorHold.nvim" -- This is needed to fix lsp doc highlight - use "folke/which-key.nvim" + use "lewis6991/impatient.nvim" + use "lukas-reineke/indent-blankline.nvim" + use "moll/vim-bbye" + use "numToStr/Comment.nvim" -- Easily comment stuff + use "nvim-lualine/lualine.nvim" + use "windwp/nvim-autopairs" -- Autopairs, integrates with both cmp and treesitter -- Colorschemes use "lunarvim/colorschemes" -- A bunch of colorschemes you can try out @@ -72,19 +68,19 @@ return packer.startup(function(use) use "hrsh7th/cmp-buffer" -- buffer completions use "hrsh7th/cmp-path" -- path completions use "hrsh7th/cmp-cmdline" -- cmdline completions - use "saadparwaiz1/cmp_luasnip" -- snippet completions use "hrsh7th/cmp-nvim-lsp" use "hrsh7th/cmp-nvim-lua" + use "saadparwaiz1/cmp_luasnip" -- snippet completions -- snippets use "L3MON4D3/LuaSnip" --snippet engine use "rafamadriz/friendly-snippets" -- a bunch of snippets to use -- LSP + use "jose-elias-alvarez/null-ls.nvim" -- for formatters and linters + use "tamago324/nlsp-settings.nvim" -- language server settings defined in json for use "neovim/nvim-lspconfig" -- enable LSP use "williamboman/nvim-lsp-installer" -- simple to use language server installer - use "tamago324/nlsp-settings.nvim" -- language server settings defined in json for - use "jose-elias-alvarez/null-ls.nvim" -- for formatters and linters -- Telescope use "nvim-telescope/telescope.nvim" -- cgit v1.2.3