mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2026-01-29 01:13:01 +01:00
nvim: init
This commit is contained in:
parent
2919c8695b
commit
9a319d8bf7
17 changed files with 179 additions and 0 deletions
9
nvim/lua/config/gitsigns.lua
Normal file
9
nvim/lua/config/gitsigns.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
}
|
||||
28
nvim/lua/config/lazy.lua
Normal file
28
nvim/lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("config") .. "/lua/lazy"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- Submodule should exist, but fail gracefully
|
||||
vim.notify("lazy.nvim submodule not found!", vim.log.levels.ERROR)
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "onedark" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
-- disable luarocks
|
||||
rocks = { enabled = false },
|
||||
})
|
||||
6
nvim/lua/config/lualine.lua
Normal file
6
nvim/lua/config/lualine.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'onedark'
|
||||
}
|
||||
}
|
||||
32
nvim/lua/config/telescope.lua
Normal file
32
nvim/lua/config/telescope.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
-- [[ Configure Telescope ]]
|
||||
-- See `:help telescope` and `:help telescope.setup()`
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-u>'] = false,
|
||||
['<C-d>'] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
require('telescope').load_extension('fzf')
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
||||
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer]' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
|
||||
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
|
||||
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
|
||||
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||
15
nvim/lua/config/treesitter.lua
Normal file
15
nvim/lua/config/treesitter.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
-- [[ Configure Treesitter ]]
|
||||
-- See `:help nvim-treesitter`
|
||||
require('nvim-treesitter').install({
|
||||
"bash",
|
||||
"comment",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown_inline",
|
||||
"markdown",
|
||||
"python",
|
||||
"rust",
|
||||
"vim",
|
||||
"yaml",
|
||||
"zsh",
|
||||
})
|
||||
1
nvim/lua/lazy
Submodule
1
nvim/lua/lazy
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 306a05526ada86a7b30af95c5cc81ffba93fef97
|
||||
5
nvim/lua/plugins/autopairs.lua
Normal file
5
nvim/lua/plugins/autopairs.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
}
|
||||
6
nvim/lua/plugins/gitsigns.lua
Normal file
6
nvim/lua/plugins/gitsigns.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = function()
|
||||
require("config.gitsigns")
|
||||
end,
|
||||
}
|
||||
7
nvim/lua/plugins/lualine.lua
Normal file
7
nvim/lua/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require("config.lualine")
|
||||
end,
|
||||
}
|
||||
10
nvim/lua/plugins/onedark.lua
Normal file
10
nvim/lua/plugins/onedark.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
"navarasu/onedark.nvim",
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
require('onedark').setup {
|
||||
style = 'warmer'
|
||||
}
|
||||
require('onedark').load()
|
||||
end
|
||||
}
|
||||
23
nvim/lua/plugins/telescope.lua
Normal file
23
nvim/lua/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
-- optional but recommended
|
||||
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
|
||||
-- `build` is used to run some command when the plugin is installed/updated.
|
||||
-- This is only run then, not every time Neovim starts up.
|
||||
build = 'make',
|
||||
|
||||
-- `cond` is a condition used to determine whether this plugin should be
|
||||
-- installed and loaded.
|
||||
cond = function()
|
||||
return vim.fn.executable 'make' == 1
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("config.telescope")
|
||||
end,
|
||||
}
|
||||
6
nvim/lua/plugins/todo-comments.lua
Normal file
6
nvim/lua/plugins/todo-comments.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
event = 'VimEnter',
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = { signs = false },
|
||||
}
|
||||
8
nvim/lua/plugins/treesitter.lua
Normal file
8
nvim/lua/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
lazy = false,
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
require("config.treesitter")
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue