Compare commits

...

2 Commits

13 changed files with 113 additions and 33 deletions

85
CHANGELOG.md Normal file
View File

@ -0,0 +1,85 @@
## [README.md](./README.md)
- [x] Language utils: Add new entries
- [x] Change `Install Kickstart` to `Install Config`
- [x] Change `### Install this Configuration` to `#### Recommended Step`
- [x] Remove `Post Installation`
- [x] FAQ: Distro Alias:
```markdown
You can apply both of these approaches to any Neovim
distribution that you would like to try out.
```
## [init.lua](./init.lua)
- [x] Add `NOTE` for `vim.g.mapleader`:
```lua
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
```
## [lua/custom/plugins/conflictmarker.lua](./lua/custom/plugins/conflictmarker.lua)
- [x] Add logic to `git_conflict_detection`:
```lua
local enabled = vim.diagnostic.is_enabled()
```
## [lua/keymaps.lua](./lua/keymaps.lua)
- [x] Add `NOTE` for `<Esc><Esc>`:
```lua
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
```
- [ ] Optional: Add `Insert` mode to arrow keymaps
## [lua/kickstart/plugins/cmp.lua](./lua/kickstart/plugins/cmp.lua)
- [x] `friendly-snippets`:
```lua
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
```
## [lua/kickstart/plugins/lspconfig.lua](./lua/kickstart/plugins/lspconfig.lua)
- [x] Add `markdownlint` via `markdown-tool-installer`
## [lua/kickstart/plugins/conform.lua](./lua/kickstart/plugins/conform.lua)
- [x] Uncomment `python` formatters
## [lua/kickstart/plugins/treesitter.lua](./lua/kickstart/plugins/treesitter.lua)
- [x] Remove empty file on line `2`
- [x] Remove Autotag and -rename:
- [x] Line 6
- [x] Line 44-50
## [lua/kickstart/plugins/which-key.lua](./lua/kickstart/plugins/which-key.lua)
- [x] Add `Terminal` to `<leader>t` keymap
## [lua/lazy-plugins.lua](./lua/lazy-plugins.lua)
- [x] Optional: Readd `tpope/vim-sleuth`
- [x] Optional: Remove `numToStr/Comment.nvim`
## [lua/options.lua](./lua/options.lua)
- [x] Change `vim.api.nvim_exec2` to `vim.cmd`

View File

@ -20,7 +20,7 @@ External Requirements:
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) - [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
- Clipboard tool (xclip/xsel/win32yank or other depending on platform) - Clipboard tool (xclip/xsel/win32yank or other depending on platform)
- A [Nerd Font](https://www.nerdfonts.com/): provides various icons - A [Nerd Font](https://www.nerdfonts.com/): provides various icons
- Language utils: `rustup`, `npm`, `dotnet`, `python` - Language utils: `rustup`, `npm`, `dotnet`, `python`, `golang`, `composer`
- Optionally, install [Alacritty](https://github.com/alacritty/alacritty#installation) - Optionally, install [Alacritty](https://github.com/alacritty/alacritty#installation)
- Or on Windows, just install using `winget install alacritty --source winget` - Or on Windows, just install using `winget install alacritty --source winget`
@ -28,7 +28,7 @@ External Requirements:
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes > See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
> and quick install snippets > and quick install snippets
### Install Kickstart ### Install Config
> **NOTE** > **NOTE**
> [Backup](#FAQ) your previous configuration (if any exists) > [Backup](#FAQ) your previous configuration (if any exists)
@ -41,7 +41,7 @@ Neovim's configurations are located under the following paths, depending on your
| Windows (cmd)| `%localappdata%\nvim\` | | Windows (cmd)| `%localappdata%\nvim\` |
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | | Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
### Install this Configuration #### Recommended Step
Clone it from GitHub: Clone it from GitHub:
@ -71,10 +71,6 @@ git clone https://github.com/Baipyrus/nvim-config.git $env:LOCALAPPDATA\nvim\
### Post Installation ### Post Installation
<details><summary> Extras for Linux and Mac </summary>
In the [`options`](./lua/options.lua) file, change the settings to specify the terminal of your choice. This installation is used and maintained by a Windows user and, as such, will use Powershell. This setting may need to be updated after each upgrade.
</details>
Start Neovim Start Neovim
```sh ```sh
@ -104,6 +100,8 @@ current plugin status. Hit `q` to close the window.
```pwsh ```pwsh
$env:NVIM_APPNAME = 'nvim-kickstart'; nvim $env:NVIM_APPNAME = 'nvim-kickstart'; nvim
``` ```
You can apply both of these approaches to any Neovim
distribution that you would like to try out.
* What if I want to "uninstall" this configuration: * What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information

View File

@ -1,5 +1,6 @@
-- Set <space> as the leader key -- Set <space> as the leader key
-- See `:help mapleader` -- See `:help mapleader`
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '

View File

@ -22,9 +22,10 @@ return {
-- Check if strict regex is contained in any line -- Check if strict regex is contained in any line
local beginning = vim.fn.match(lines, vim.g.conflict_marker_begin) local beginning = vim.fn.match(lines, vim.g.conflict_marker_begin)
local ending = vim.fn.match(lines, vim.g.conflict_marker_end) local ending = vim.fn.match(lines, vim.g.conflict_marker_end)
if beginning > -1 or ending > -1 then local enabled = vim.diagnostic.is_enabled()
if (beginning > -1 or ending > -1) and enabled then
vim.diagnostic.enable(false) vim.diagnostic.enable(false)
else elseif not enabled then
vim.diagnostic.enable(true) vim.diagnostic.enable(true)
end end
end end

View File

@ -18,5 +18,6 @@ return {
lazy = true, lazy = true,
cmd = { 'Flogsplit' }, cmd = { 'Flogsplit' },
}, },
'idanarye/vim-merginal',
}, },
} }

View File

@ -12,6 +12,7 @@ vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagn
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' }) vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- Open terminal in current window -- Open terminal in current window

View File

@ -25,11 +25,15 @@ return {
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
-- If you want to add a bunch of pre-configured snippets, -- `friendly-snippets` contains a variety of premade snippets.
-- you can use this plugin to help you. It even has snippets -- See the README about individual language/framework/plugin snippets:
-- for various frameworks/libraries/etc. but you will have to -- https://github.com/rafamadriz/friendly-snippets
-- set up the ones that are useful for you. {
'rafamadriz/friendly-snippets', 'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
}, },
config = function() config = function()
-- See `:help cmp` -- See `:help cmp`

View File

@ -28,8 +28,8 @@ return {
formatters_by_ft = { formatters_by_ft = {
lua = { 'stylua' }, lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" }, python = { 'isort', 'black' },
--
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use a sub-list to tell conform to run *until* a formatter
-- is found. -- is found.
javascript = { { 'prettierd', 'prettier' } }, javascript = { { 'prettierd', 'prettier' } },

View File

@ -214,6 +214,9 @@ return {
'eslint_d', 'eslint_d',
'prettier', 'prettier',
'prettierd', 'prettierd',
'markdownlint',
'isort',
'black',
}) })
require('mason-tool-installer').setup { ensure_installed = ensure_installed } require('mason-tool-installer').setup { ensure_installed = ensure_installed }

View File

@ -1,9 +1,7 @@
return { return {
{ -- Highlight, edit, and navigate code { -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
dependencies = { dependencies = {
'windwp/nvim-ts-autotag',
'nvim-treesitter/nvim-treesitter-context', 'nvim-treesitter/nvim-treesitter-context',
'nvim-treesitter/nvim-treesitter-textobjects', 'nvim-treesitter/nvim-treesitter-textobjects',
}, },
@ -41,13 +39,6 @@ return {
ignore_install = { ignore_install = {
'arduino', 'arduino',
}, },
-- Enable autotags and -rename
autotag = {
enable = true,
enable_close = true,
enable_rename = true,
enable_autocmd = true,
},
highlight = { highlight = {
enable = true, enable = true,
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.

View File

@ -26,7 +26,7 @@ return {
{ '<leader>r', group = '[R]ename' }, { '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' }, { '<leader>s', group = '[S]earch' },
{ '<leader>w', group = '[W]orkspace' }, { '<leader>w', group = '[W]orkspace' },
{ '<leader>t', group = '[T]oggle', mode = { 'n', 'v' } }, { '<leader>t', group = '[T]oggle/[T]erminal', mode = { 'n', 'v' } },
{ '<leader>h', group = 'Git [H]unk/[H]arpoon', mode = { 'n', 'v' } }, { '<leader>h', group = 'Git [H]unk/[H]arpoon', mode = { 'n', 'v' } },
{ '<leader>g', group = '[G]it/[G]lobal', mode = { 'n', 'v' } }, { '<leader>g', group = '[G]it/[G]lobal', mode = { 'n', 'v' } },
{ '<leader>b', group = '[B]uffer/[B]reakpoint' }, { '<leader>b', group = '[B]uffer/[B]reakpoint' },

View File

@ -18,18 +18,13 @@ require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'sophacles/vim-processing', -- Processing-Java 'sophacles/vim-processing', -- Processing-Java
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
-- NOTE: Plugins can also be added by using a table, -- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following -- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc. -- keys can be used to configure plugin behavior/loading/etc.
-- --
-- Use `opts = {}` to force a plugin to be loaded. -- Use `opts = {}` to force a plugin to be loaded.
--
-- This is equivalent to:
-- require('Comment').setup({})
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
-- modular approach: using `require 'path/name'` will -- modular approach: using `require 'path/name'` will
-- include a plugin definition from file lua/path/name.lua -- include a plugin definition from file lua/path/name.lua

View File

@ -4,7 +4,7 @@
-- For more options, you can see `:help option-list` -- For more options, you can see `:help option-list`
-- Set display language -- Set display language
vim.api.nvim_exec2('language en_US', {}) vim.cmd('language en_US', {})
-- Shell options -- Shell options
-- Sets the shell to use for system() and ! commands in windows -- Sets the shell to use for system() and ! commands in windows