From 3591ba06556f142536bbe855f0297af3aa351e77 Mon Sep 17 00:00:00 2001 From: titusdmoore Date: Sat, 1 Apr 2023 23:26:30 -0400 Subject: [PATCH 1/6] Copilot chanage --- init.lua | 46 ++++--------------------------------- lua/custom/plugins/init.lua | 6 ++++- 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/init.lua b/init.lua index 72890326..4255a836 100644 --- a/init.lua +++ b/init.lua @@ -1,42 +1,3 @@ ---[[ - -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== - -Kickstart.nvim is *not* a distribution. - -Kickstart.nvim is a template for your own configuration. - The goal is that you can read every line of code, top-to-bottom, and understand - what your configuration is doing. - - Once you've done that, you should start exploring, configuring and tinkering to - explore Neovim! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example: - - https://learnxinyminutes.com/docs/lua/ - - And then you can explore or search through `:help lua-guide` - - -Kickstart Guide: - -I have left several `:help X` comments throughout the init.lua -You should run that command and read that help section for more information. - -In addition, I have some `NOTE:` items throughout the file. -These are for you, the reader to help understand what is happening. Feel free to delete -them once you know what you're doing, but they should serve as a guide for when you -are first encountering a few different constructs in your nvim config. - -I hope you enjoy your Neovim journey, -- TJ - -P.S. You can delete this when you're done too. It's your config now :) ---]] - --- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) vim.g.mapleader = ' ' @@ -175,7 +136,7 @@ require('lazy').setup({ -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- These are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them. - -- require 'kickstart.plugins.autoformat', + require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.debug', -- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua` @@ -197,6 +158,7 @@ vim.o.hlsearch = false -- Make line numbers default vim.wo.number = true +vim.wo.relativenumber = true -- Enable mouse mode vim.o.mouse = 'a' @@ -288,8 +250,8 @@ vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { de -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim' }, - + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vim' }, + -- ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..2ad10d8d 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,8 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + "github/copilot.vim" + } +} From b9ee8f57e0b931bb0388f587139df35e16eee249 Mon Sep 17 00:00:00 2001 From: Titus Moore Date: Mon, 3 Apr 2023 16:09:43 -0400 Subject: [PATCH 2/6] Re-alias copilot command --- init.lua | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 4255a836..c77b0dc8 100644 --- a/init.lua +++ b/init.lua @@ -36,7 +36,8 @@ require('lazy').setup({ -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. - { -- LSP Configuration & Plugins + { + -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim @@ -52,14 +53,16 @@ require('lazy').setup({ }, }, - { -- Autocompletion + { + -- Autocompletion 'hrsh7th/nvim-cmp', dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' }, }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, - { -- Adds git releated signs to the gutter, as well as utilities for managing changes + { 'folke/which-key.nvim', opts = {} }, + { + -- Adds git releated signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { -- See `:help gitsigns.txt` @@ -73,7 +76,8 @@ require('lazy').setup({ }, }, - { -- Theme inspired by Atom + { + -- Theme inspired by Atom 'navarasu/onedark.nvim', priority = 1000, config = function() @@ -81,7 +85,8 @@ require('lazy').setup({ end, }, - { -- Set lualine as statusline + { + -- Set lualine as statusline 'nvim-lualine/lualine.nvim', -- See `:help lualine.txt` opts = { @@ -94,7 +99,8 @@ require('lazy').setup({ }, }, - { -- Add indentation guides even on blank lines + { + -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` @@ -105,7 +111,7 @@ require('lazy').setup({ }, -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- Fuzzy Finder (files, lsp, etc) { 'nvim-telescope/telescope.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim' } }, @@ -123,7 +129,8 @@ require('lazy').setup({ end, }, - { -- Highlight, edit, and navigate code + { + -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', @@ -246,6 +253,11 @@ vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { de vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) +-- Copilot Re-alias +vim.g.copilot_no_tab_map = true +vim.g.copilot_assumed_mapped = true +vim.keymap.set('i', '', 'copilot#Accept("")', { expr = true, silent = true }) + -- [[ Configure Treesitter ]] -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { @@ -372,9 +384,8 @@ local servers = { -- clangd = {}, -- gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, - -- tsserver = {}, - + rust_analyzer = {}, + tsserver = {}, lua_ls = { Lua = { workspace = { checkThirdParty = false }, From a302871104a09c09e4a1df1de4452b159a439896 Mon Sep 17 00:00:00 2001 From: Titus Moore Date: Tue, 4 Apr 2023 16:11:06 -0400 Subject: [PATCH 3/6] Add auto close plugin as well as php parser --- init.lua | 2 +- lua/custom/plugins/init.lua | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c77b0dc8..3c4751ed 100644 --- a/init.lua +++ b/init.lua @@ -262,7 +262,7 @@ vim.keymap.set('i', '', 'copilot#Accept("")', { expr = true, silent = t -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vim' }, + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vim', 'php' }, -- ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 2ad10d8d..e4bf4393 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -5,5 +5,11 @@ return { { "github/copilot.vim" + }, + { + "windwp/nvim-autopairs", + config = function() + require("nvim-autopairs").setup {} + end, } } From 4eba0d9b6d218d4b92eaa5f95d1d29323bf989d1 Mon Sep 17 00:00:00 2001 From: titusdmoore Date: Tue, 4 Apr 2023 20:49:23 -0400 Subject: [PATCH 4/6] Added astro formatting --- lua/custom/plugins/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index e4bf4393..a44f4038 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -11,5 +11,8 @@ return { config = function() require("nvim-autopairs").setup {} end, + }, + { + 'wuelnerdotexe/vim-astro' } } From bd200c89c2e5f1550bda3c08618237c41c738e29 Mon Sep 17 00:00:00 2001 From: Titus Moore Date: Wed, 12 Apr 2023 17:59:47 -0400 Subject: [PATCH 5/6] Actually add the file --- lua/custom/plugins/filetree.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lua/custom/plugins/filetree.lua diff --git a/lua/custom/plugins/filetree.lua b/lua/custom/plugins/filetree.lua new file mode 100644 index 00000000..b228effe --- /dev/null +++ b/lua/custom/plugins/filetree.lua @@ -0,0 +1,14 @@ +vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) + +return { + "nvim-neo-tree/neo-tree.nvim", + version = "*", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + }, + config = function() + require('neo-tree').setup {} + end, +} From e70ecd06e6dfc9fbadb2a031a451078e2a1aa0b7 Mon Sep 17 00:00:00 2001 From: Titus Moore Date: Thu, 13 Apr 2023 12:11:42 -0400 Subject: [PATCH 6/6] Resolved merge conflicts --- .github/ISSUE_TEMPLATE/bug_report.md | 16 +++++++++------- README.md | 4 ++-- init.lua | 13 ++++--------- lua/kickstart/plugins/debug.lua | 10 ++++------ 4 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6999d51e..2ad4d31d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,19 +8,21 @@ assignees: '' --- -**Describe the bug** -A clear and concise description of what the bug is. -**To Reproduce** -Steps to reproduce the behavior: +## Describe the bug + + +## To Reproduce + 1. ... -**Desktop (please complete the following information):** +## Desktop + - OS: - Terminal: -** Neovim Version ** - - Output of running `:version` from inside of neovim: +## Neovim Version + ``` ``` diff --git a/README.md b/README.md index ce72ebbf..21fcab3d 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ return { } ``` -This will install the tree plugin and add the command `:NeoTree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information. +This will install the tree plugin and add the command `:Neotree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information. #### Example: Adding a file to change default options @@ -118,7 +118,7 @@ Each PR, especially those which increase the line count, should have a descripti Installation may require installing build tools, and updating the run command for `telescope-fzf-native` -See `telescope-fzf-native` documention for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) +See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) This requires: diff --git a/init.lua b/init.lua index 3c4751ed..204cd21f 100644 --- a/init.lua +++ b/init.lua @@ -41,7 +41,7 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim - 'williamboman/mason.nvim', + { 'williamboman/mason.nvim', config = true }, 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP @@ -135,9 +135,7 @@ require('lazy').setup({ dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', }, - config = function() - pcall(require('nvim-treesitter.install').update { with_sync = true }) - end, + build = ":TSUpdate", }, -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart @@ -262,8 +260,8 @@ vim.keymap.set('i', '', 'copilot#Accept("")', { expr = true, silent = t -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vim', 'php' }, - -- ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim' }, + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'php' }, + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, @@ -401,9 +399,6 @@ require('neodev').setup() local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) --- Setup mason so it can manage external tooling -require('mason').setup() - -- Ensure the servers above are installed local mason_lspconfig = require 'mason-lspconfig' diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 0b68c43b..000bcb8f 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -9,7 +9,6 @@ return { -- NOTE: Yes, you can install new plugins here! 'mfussenegger/nvim-dap', - -- NOTE: And you can specify dependencies as well dependencies = { -- Creates a beautiful debugger UI @@ -22,7 +21,6 @@ return { -- Add your own debuggers here 'leoluz/nvim-dap-go', }, - config = function() local dap = require 'dap' local dapui = require 'dapui' @@ -32,6 +30,10 @@ return { -- reasonable debug configurations automatic_setup = true, + -- You can provide additional configuration to the handlers, + -- see mason-nvim-dap README for more information + handlers = {}, + -- You'll need to check that you have the required things installed -- online, please don't ask me how to install them :) ensure_installed = { @@ -40,10 +42,6 @@ return { }, } - -- You can provide additional configuration to the handlers, - -- see mason-nvim-dap README for more information - require('mason-nvim-dap').setup_handlers() - -- Basic debugging keymaps, feel free to change to your liking! vim.keymap.set('n', '', dap.continue) vim.keymap.set('n', '', dap.step_into)