From 62a5f9c8be06d0647911fbab0821e4a93fb23f4e Mon Sep 17 00:00:00 2001 From: Philippe Zwietering Date: Tue, 10 Sep 2024 09:08:31 +0200 Subject: [PATCH] Mainly alignment --- after/plugin/colors.lua | 11 ++--- after/plugin/harpoon.lua | 8 ++-- after/plugin/lsp.lua | 24 +++++------ after/plugin/telescope.lua | 2 +- after/plugin/treesitter.lua | 33 +++++++-------- lua/flip/packer.lua | 81 ++++++++++++++++++------------------- lua/flip/set.lua | 1 - 7 files changed, 80 insertions(+), 80 deletions(-) diff --git a/after/plugin/colors.lua b/after/plugin/colors.lua index 4f0ae84..6ed540d 100644 --- a/after/plugin/colors.lua +++ b/after/plugin/colors.lua @@ -1,10 +1,11 @@ function ColorMyPencils(color) - color = color or "dichromatic" - vim.cmd.colorscheme(color) - - vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) + color = color or "dichromatic" + vim.cmd.colorscheme(color) + vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) end +vim.keymap.set("n", "c", function() ColorMyPencils() end) + ColorMyPencils() diff --git a/after/plugin/harpoon.lua b/after/plugin/harpoon.lua index 50033d5..bb6834d 100644 --- a/after/plugin/harpoon.lua +++ b/after/plugin/harpoon.lua @@ -3,7 +3,7 @@ local ui = require("harpoon.ui") vim.keymap.set("n", "a", mark.add_file) vim.keymap.set("n", "", ui.toggle_quick_menu) -vim.keymap.set("n", "", function() ui.nav_file(1) end) -vim.keymap.set("n", "", function() ui.nav_file(2) end) -vim.keymap.set("n", "", function() ui.nav_file(3) end) -vim.keymap.set("n", "", function() ui.nav_file(4) end) +vim.keymap.set("n", "1", function() ui.nav_file(1) end) +vim.keymap.set("n", "2", function() ui.nav_file(2) end) +vim.keymap.set("n", "3", function() ui.nav_file(3) end) +vim.keymap.set("n", "4", function() ui.nav_file(4) end) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 3ea845f..406078f 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -1,13 +1,13 @@ local lsp = require('lsp-zero').preset({}) lsp.ensure_installed({ - 'lua_ls', -- Lua - 'rust_analyzer', -- rust - 'texlab', -- LaTeX - 'clangd', -- C/C++ - 'jedi_language_server', -- Python - 'html', -- HTML - 'ocamllsp', -- OCaml + 'lua_ls', -- Lua + 'rust_analyzer', -- rust + 'texlab', -- LaTeX + 'clangd', -- C/C++ + 'jedi_language_server', -- Python + 'html', -- HTML + 'ocamllsp', -- OCaml }) -- Fix undefined global 'vim' @@ -33,14 +33,14 @@ lsp.configure('lua_ls', { }) lsp.on_attach(function(_, bufnr) - lsp.default_keymaps({buffer = bufnr}) + lsp.default_keymaps({ buffer = bufnr }) end) lsp.set_sign_icons({ - error = '✘', - warn = '▲', - hint = '⚑', - info = '»' + error = '✘', + warn = '▲', + hint = '⚑', + info = '»' }) lsp.setup() diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua index 4806008..2b36359 100644 --- a/after/plugin/telescope.lua +++ b/after/plugin/telescope.lua @@ -2,5 +2,5 @@ local builtin = require('telescope.builtin') vim.keymap.set('n', 'pf', builtin.find_files, {}) vim.keymap.set('n', '', builtin.git_files, {}) vim.keymap.set('n', 'ps', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }); + builtin.grep_string({ search = vim.fn.input("Grep > ") }); end) diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua index 351cb00..8621d8e 100644 --- a/after/plugin/treesitter.lua +++ b/after/plugin/treesitter.lua @@ -1,21 +1,22 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "cpp", "cmake", "latex", "python" }, +require 'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" (the five listed parsers should always be installed) + ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "cpp", "cmake", "latex", "python", "groovy", + "ocaml" }, - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, - highlight = { - enable = true, + highlight = { + enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, } diff --git a/lua/flip/packer.lua b/lua/flip/packer.lua index 34559e4..fae3c28 100644 --- a/lua/flip/packer.lua +++ b/lua/flip/packer.lua @@ -4,50 +4,49 @@ vim.cmd [[packadd packer.nvim]] return require('packer').startup(function(use) - -- Packer can manage itself - use 'wbthomason/packer.nvim' + -- Packer can manage itself + use 'wbthomason/packer.nvim' - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.6', - -- or , branch = '0.1.x', - requires = { {'nvim-lua/plenary.nvim'} } - } + use { + 'nvim-telescope/telescope.nvim', tag = '0.1.6', + -- or , branch = '0.1.x', + requires = { { 'nvim-lua/plenary.nvim' } } + } - -- Color stuff - use ({ - 'romainl/vim-dichromatic', - config = function() - vim.cmd('colorscheme dichromatic') - end - }) + -- Color stuff + use({ + 'romainl/vim-dichromatic', + config = function() + vim.cmd('colorscheme dichromatic') + end + }) - -- Miscellaneous packages that fit on a line - use ('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'}) - use ('nvim-treesitter/playground') - use ('theprimeagen/harpoon') - use ('mbbill/undotree') - use ('tpope/vim-fugitive') + -- Miscellaneous packages that fit on a line + use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) + use('nvim-treesitter/playground') + use('theprimeagen/harpoon') + use('mbbill/undotree') + use('tpope/vim-fugitive') - -- LSP stuff - use { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v2.x', - requires = { - -- LSP Support - {'neovim/nvim-lspconfig'}, -- Required - { -- Optional - 'williamboman/mason.nvim', - run = function() - pcall(vim.cmd, 'MasonUpdate') - end, - }, - {'williamboman/mason-lspconfig.nvim'}, -- Optional - - -- Autocompletion - {'hrsh7th/nvim-cmp'}, -- Required - {'hrsh7th/cmp-nvim-lsp'}, -- Required - {'L3MON4D3/LuaSnip'}, -- Required - } - } + -- LSP stuff + use { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v2.x', + requires = { + -- LSP Support + { 'neovim/nvim-lspconfig' }, -- Required + { -- Optional + 'williamboman/mason.nvim', + run = function() + pcall(vim.cmd, 'MasonUpdate') + end, + }, + { 'williamboman/mason-lspconfig.nvim' }, -- Optional + -- Autocompletion + { 'hrsh7th/nvim-cmp' }, -- Required + { 'hrsh7th/cmp-nvim-lsp' }, -- Required + { 'L3MON4D3/LuaSnip' }, -- Required + } + } end) diff --git a/lua/flip/set.lua b/lua/flip/set.lua index 3547a68..c6cab5e 100644 --- a/lua/flip/set.lua +++ b/lua/flip/set.lua @@ -33,4 +33,3 @@ vim.opt.updatetime = 50 vim.opt.colorcolumn = "120" -vim.g.mapleader = " "