mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 13:21:45 +00:00
Compare commits
2 Commits
b648a78bdf
...
c88bb02155
Author | SHA1 | Date | |
---|---|---|---|
c88bb02155 | |||
1f7e2bd3c8 |
85
CHANGELOG.md
Normal file
85
CHANGELOG.md
Normal 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`
|
12
README.md
12
README.md
@ -20,7 +20,7 @@ External Requirements:
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||
- Clipboard tool (xclip/xsel/win32yank or other depending on platform)
|
||||
- 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)
|
||||
- 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
|
||||
> and quick install snippets
|
||||
|
||||
### Install Kickstart
|
||||
### Install Config
|
||||
|
||||
> **NOTE**
|
||||
> [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 (powershell)| `$env:LOCALAPPDATA\nvim\` |
|
||||
|
||||
### Install this Configuration
|
||||
#### Recommended Step
|
||||
|
||||
Clone it from GitHub:
|
||||
|
||||
@ -71,10 +71,6 @@ git clone https://github.com/Baipyrus/nvim-config.git $env:LOCALAPPDATA\nvim\
|
||||
|
||||
### 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
|
||||
|
||||
```sh
|
||||
@ -104,6 +100,8 @@ current plugin status. Hit `q` to close the window.
|
||||
```pwsh
|
||||
$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:
|
||||
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
|
||||
|
||||
|
1
init.lua
1
init.lua
@ -1,5 +1,6 @@
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
|
@ -22,9 +22,10 @@ return {
|
||||
-- Check if strict regex is contained in any line
|
||||
local beginning = vim.fn.match(lines, vim.g.conflict_marker_begin)
|
||||
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)
|
||||
else
|
||||
elseif not enabled then
|
||||
vim.diagnostic.enable(true)
|
||||
end
|
||||
end
|
||||
|
@ -18,5 +18,6 @@ return {
|
||||
lazy = true,
|
||||
cmd = { 'Flogsplit' },
|
||||
},
|
||||
'idanarye/vim-merginal',
|
||||
},
|
||||
}
|
||||
|
@ -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' })
|
||||
|
||||
-- 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' })
|
||||
|
||||
-- Open terminal in current window
|
||||
|
@ -25,11 +25,15 @@ return {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
|
||||
-- If you want to add a bunch of pre-configured snippets,
|
||||
-- you can use this plugin to help you. It even has snippets
|
||||
-- for various frameworks/libraries/etc. but you will have to
|
||||
-- set up the ones that are useful for you.
|
||||
'rafamadriz/friendly-snippets',
|
||||
-- `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,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
-- See `:help cmp`
|
||||
|
@ -28,8 +28,8 @@ return {
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
-- 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
|
||||
-- is found.
|
||||
javascript = { { 'prettierd', 'prettier' } },
|
||||
|
@ -214,6 +214,9 @@ return {
|
||||
'eslint_d',
|
||||
'prettier',
|
||||
'prettierd',
|
||||
'markdownlint',
|
||||
'isort',
|
||||
'black',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
return {
|
||||
|
||||
{ -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
dependencies = {
|
||||
'windwp/nvim-ts-autotag',
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
@ -41,13 +39,6 @@ return {
|
||||
ignore_install = {
|
||||
'arduino',
|
||||
},
|
||||
-- Enable autotags and -rename
|
||||
autotag = {
|
||||
enable = true,
|
||||
enable_close = true,
|
||||
enable_rename = true,
|
||||
enable_autocmd = true,
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- 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>s', group = '[S]earch' },
|
||||
{ '<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>g', group = '[G]it/[G]lobal', mode = { 'n', 'v' } },
|
||||
{ '<leader>b', group = '[B]uffer/[B]reakpoint' },
|
||||
|
@ -18,18 +18,13 @@ require('lazy').setup({
|
||||
|
||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||
'sophacles/vim-processing', -- Processing-Java
|
||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
-- NOTE: Plugins can also be added by using a table,
|
||||
-- with the first argument being the link and the following
|
||||
-- keys can be used to configure plugin behavior/loading/etc.
|
||||
--
|
||||
-- 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
|
||||
-- include a plugin definition from file lua/path/name.lua
|
||||
|
@ -4,7 +4,7 @@
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Set display language
|
||||
vim.api.nvim_exec2('language en_US', {})
|
||||
vim.cmd('language en_US', {})
|
||||
|
||||
-- Shell options
|
||||
-- Sets the shell to use for system() and ! commands in windows
|
||||
|
Loading…
Reference in New Issue
Block a user