Compare commits
9 Commits
f6c3365854
...
960d0fd871
Author | SHA1 | Date |
---|---|---|
Julian Raufelder | 960d0fd871 | |
Julian Raufelder | b18faa77bc | |
Julian Raufelder | b6c54d6b3c | |
Chris Patti | 1a971cbdcf | |
George Angelopoulos | a347bb401e | |
Chris Patti | 01a1ebed38 | |
Erik | 555dd8ed27 | |
Chris Patti | 98ad2ee32a | |
Smig | d0b47ce958 |
|
@ -36,7 +36,7 @@ Distribution Alternatives:
|
||||||
`~/.config/nvim` (MacOS)
|
`~/.config/nvim` (MacOS)
|
||||||
`%userprofile%\AppData\Local\nvim\` (Windows)
|
`%userprofile%\AppData\Local\nvim\` (Windows)
|
||||||
|
|
||||||
* run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim`
|
* Run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim`
|
||||||
* Run Neovim (from terminal or shortcut) and allow lazy.nvim to download files and set up the basics.
|
* Run Neovim (from terminal or shortcut) and allow lazy.nvim to download files and set up the basics.
|
||||||
* Once the setup is complete, restart Neovim.
|
* Once the setup is complete, restart Neovim.
|
||||||
* **You're ready to go!**
|
* **You're ready to go!**
|
||||||
|
|
75
init.lua
75
init.lua
|
@ -17,7 +17,9 @@ Kickstart.nvim is a template for your own configuration.
|
||||||
a guide. One possible example:
|
a guide. One possible example:
|
||||||
- https://learnxinyminutes.com/docs/lua/
|
- https://learnxinyminutes.com/docs/lua/
|
||||||
|
|
||||||
|
|
||||||
And then you can explore or search through `:help lua-guide`
|
And then you can explore or search through `:help lua-guide`
|
||||||
|
- https://neovim.io/doc/user/lua-guide.html
|
||||||
|
|
||||||
|
|
||||||
Kickstart Guide:
|
Kickstart Guide:
|
||||||
|
@ -196,7 +198,33 @@ require('lazy').setup({
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
},
|
},
|
||||||
|
|
||||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
-- Bufferline shows tab
|
||||||
|
{'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons'},
|
||||||
|
-- List entered commands
|
||||||
|
{'gelguy/wilder.nvim', version = "*", config = function() end },
|
||||||
|
-- File browser
|
||||||
|
{
|
||||||
|
"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,
|
||||||
|
},
|
||||||
|
-- Markdown preview
|
||||||
|
{'iamcco/markdown-preview.nvim',
|
||||||
|
ft = "markdown",
|
||||||
|
-- build = "cd app && yarn install", -- after removing Joplin one day
|
||||||
|
build = "cd app && npm install",
|
||||||
|
init = function() vim.g.mkdp_filetypes = { "markdown" } end,
|
||||||
|
},
|
||||||
|
'christoomey/vim-tmux-navigator',
|
||||||
|
|
||||||
|
-- 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.
|
-- These are some example plugins that I've included in the kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them.
|
-- Uncomment any of the lines below to enable them.
|
||||||
-- require 'kickstart.plugins.autoformat',
|
-- require 'kickstart.plugins.autoformat',
|
||||||
|
@ -216,11 +244,35 @@ require('lazy').setup({
|
||||||
-- NOTE: You can change these options as you wish!
|
-- NOTE: You can change these options as you wish!
|
||||||
|
|
||||||
-- Set highlight on search
|
-- Set highlight on search
|
||||||
vim.o.hlsearch = false
|
vim.o.hlsearch = true
|
||||||
|
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
|
|
||||||
|
-- Toggle line numbers depending on the vim mode
|
||||||
|
local augroup = vim.api.nvim_create_augroup("numbertoggle", {})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "InsertLeave", "CmdlineLeave", "WinEnter" }, {
|
||||||
|
pattern = "*",
|
||||||
|
group = augroup,
|
||||||
|
callback = function()
|
||||||
|
if vim.o.nu and vim.api.nvim_get_mode().mode ~= "i" then
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "InsertEnter", "CmdlineEnter", "WinLeave" }, {
|
||||||
|
pattern = "*",
|
||||||
|
group = augroup,
|
||||||
|
callback = function()
|
||||||
|
if vim.o.nu then
|
||||||
|
vim.opt.relativenumber = false
|
||||||
|
vim.cmd "redraw"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Enable mouse mode
|
-- Enable mouse mode
|
||||||
vim.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
@ -311,7 +363,7 @@ vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { de
|
||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
|
ensure_installed = { 'lua', 'python', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash', 'css', 'dockerfile', 'html', 'java', 'kotlin', 'json', 'markdown_inline', 'ruby', 'sql', 'toml', 'vue', 'yaml' },
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
@ -523,3 +575,20 @@ cmp.setup {
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
--
|
||||||
|
|
||||||
|
vim.keymap.set('i', 'jj', '<esc>', { desc = 'Closes insert mode' })
|
||||||
|
vim.keymap.set('n', 'ec', ':', { desc = 'Execute command' })
|
||||||
|
|
||||||
|
-- bufferline
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
require("bufferline").setup{}
|
||||||
|
|
||||||
|
-- wilder
|
||||||
|
local wilder = require('wilder')
|
||||||
|
wilder.setup({modes = {':', '/', '?'}})
|
||||||
|
|
||||||
|
-- filetree
|
||||||
|
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
||||||
|
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
}
|
Loading…
Reference in New Issue