mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-27 05:41:45 +00:00
Compare commits
No commits in common. "c88bb021551869c8c53beae0fa1282b4aedd95e4" and "b648a78bdfaa2c832d819d14f963d816d1dc66f9" have entirely different histories.
c88bb02155
...
b648a78bdf
85
CHANGELOG.md
85
CHANGELOG.md
@ -1,85 +0,0 @@
|
|||||||
## [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`
|
|
12
README.md
12
README.md
@ -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`, `golang`, `composer`
|
- Language utils: `rustup`, `npm`, `dotnet`, `python`
|
||||||
- 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 Config
|
### Install Kickstart
|
||||||
|
|
||||||
> **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\` |
|
||||||
|
|
||||||
#### Recommended Step
|
### Install this Configuration
|
||||||
|
|
||||||
Clone it from GitHub:
|
Clone it from GitHub:
|
||||||
|
|
||||||
@ -71,6 +71,10 @@ 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
|
||||||
@ -100,8 +104,6 @@ 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
|
||||||
|
|
||||||
|
1
init.lua
1
init.lua
@ -1,6 +1,5 @@
|
|||||||
-- 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 = ' '
|
||||||
|
|
||||||
|
@ -22,10 +22,9 @@ 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)
|
||||||
local enabled = vim.diagnostic.is_enabled()
|
if beginning > -1 or ending > -1 then
|
||||||
if (beginning > -1 or ending > -1) and enabled then
|
|
||||||
vim.diagnostic.enable(false)
|
vim.diagnostic.enable(false)
|
||||||
elseif not enabled then
|
else
|
||||||
vim.diagnostic.enable(true)
|
vim.diagnostic.enable(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -18,6 +18,5 @@ return {
|
|||||||
lazy = true,
|
lazy = true,
|
||||||
cmd = { 'Flogsplit' },
|
cmd = { 'Flogsplit' },
|
||||||
},
|
},
|
||||||
'idanarye/vim-merginal',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ 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
|
||||||
|
@ -25,15 +25,11 @@ return {
|
|||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
'hrsh7th/cmp-path',
|
'hrsh7th/cmp-path',
|
||||||
|
|
||||||
-- `friendly-snippets` contains a variety of premade snippets.
|
-- If you want to add a bunch of pre-configured snippets,
|
||||||
-- See the README about individual language/framework/plugin snippets:
|
-- you can use this plugin to help you. It even has snippets
|
||||||
-- https://github.com/rafamadriz/friendly-snippets
|
-- for various frameworks/libraries/etc. but you will have to
|
||||||
{
|
-- 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`
|
||||||
|
@ -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' } },
|
||||||
|
@ -214,9 +214,6 @@ 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 }
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
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',
|
||||||
},
|
},
|
||||||
@ -39,6 +41,13 @@ 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.
|
||||||
|
@ -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/[T]erminal', mode = { 'n', 'v' } },
|
{ '<leader>t', group = '[T]oggle', 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' },
|
||||||
|
@ -18,13 +18,18 @@ 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
|
||||||
|
@ -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.cmd('language en_US', {})
|
vim.api.nvim_exec2('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
|
||||||
|
Loading…
Reference in New Issue
Block a user