fix indentation
This commit is contained in:
parent
e005338d68
commit
00e4d34f5f
10 changed files with 169 additions and 164 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
return {
|
return {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
lazy = true
|
lazy = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,38 @@
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
return {
|
return {
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
-- See `:help gitsigns.txt`
|
-- See `:help gitsigns.txt`
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = '+' },
|
add = { text = '+' },
|
||||||
change = { text = '~' },
|
change = { text = '~' },
|
||||||
delete = { text = '_' },
|
delete = { text = '_' },
|
||||||
topdelete = { text = '‾' },
|
topdelete = { text = '‾' },
|
||||||
changedelete = { text = '~' },
|
changedelete = { text = '~' },
|
||||||
},
|
},
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
--vim.keymap.set('n', '<leader>hp', require('gitsigns').preview_hunk, { buffer = bufnr, desc = 'Preview git hunk' })
|
--vim.keymap.set('n', '<leader>hp', require('gitsigns').preview_hunk, { buffer = bufnr, desc = 'Preview git hunk' })
|
||||||
|
|
||||||
-- don't override the built-in and fugitive keymaps
|
-- don't override the built-in and fugitive keymaps
|
||||||
local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
vim.keymap.set({ 'n', 'v' }, ']c', function()
|
vim.keymap.set({ 'n', 'v' }, ']c', function()
|
||||||
if vim.wo.diff then
|
if vim.wo.diff then
|
||||||
return ']c'
|
return ']c'
|
||||||
end
|
end
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
gs.next_hunk()
|
gs.next_hunk()
|
||||||
end)
|
end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' })
|
end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
||||||
if vim.wo.diff then
|
if vim.wo.diff then
|
||||||
return '[c'
|
return '[c'
|
||||||
end
|
end
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
gs.prev_hunk()
|
gs.prev_hunk()
|
||||||
end)
|
end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' })
|
end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
-- status line like vim-airline
|
-- status line like vim-airline
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
--component_separators = '⋮',
|
--component_separators = '⋮',
|
||||||
component_separators = '⁞',
|
component_separators = '⁞',
|
||||||
section_separators = { left = '', right = '' },
|
--section_separators = { left = '', right = '' },
|
||||||
},
|
--section_separators = { left = '', right = '' },
|
||||||
},
|
section_separators = { left = '', right = '' },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
return {
|
return {
|
||||||
'EdenEast/nightfox.nvim',
|
'EdenEast/nightfox.nvim',
|
||||||
priority = 1000,
|
lazy = true,
|
||||||
config = function()
|
priority = 1000,
|
||||||
vim.cmd.colorscheme 'duskfox'
|
opts = {},
|
||||||
end,
|
--config = function()
|
||||||
|
-- vim.cmd.colorscheme 'duskfox'
|
||||||
|
--end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
"nvim-telescope/telescope-file-browser.nvim",
|
||||||
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@ If you have huge amounts of files, consider adding some to `$HOME/.ignore`:
|
||||||
.git/
|
.git/
|
||||||
]]--
|
]]--
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
-- Telescope
|
-- Telescope
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
tag = "0.1.4",
|
tag = "0.1.4",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-lua/plenary.nvim" }
|
{ "nvim-lua/plenary.nvim" }
|
||||||
},
|
},
|
||||||
config = function(lazy, opts)
|
config = function(lazy, opts)
|
||||||
local telescope = require('telescope')
|
local telescope = require('telescope')
|
||||||
telescope.load_extension('fzf')
|
telescope.load_extension('fzf')
|
||||||
telescope.load_extension('file_browser')
|
telescope.load_extension('file_browser')
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
sorting_strategy = "ascending",
|
sorting_strategy = "ascending",
|
||||||
wrap_result = true,
|
wrap_result = true,
|
||||||
layout_strategy = "horizontal",
|
layout_strategy = "horizontal",
|
||||||
layout_config = {
|
layout_config = {
|
||||||
horizontal = {
|
horizontal = {
|
||||||
prompt_position = "top",
|
prompt_position = "top",
|
||||||
preview_width = 0.4,
|
preview_width = 0.4,
|
||||||
width = 0.75,
|
width = 0.75,
|
||||||
height = 0.75,
|
height = 0.75,
|
||||||
preview_cutoff = 10,
|
preview_cutoff = 10,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
hidden = true
|
hidden = true
|
||||||
},
|
},
|
||||||
live_grep = {
|
live_grep = {
|
||||||
additional_args = function()
|
additional_args = function()
|
||||||
return { '--hidden', '--glob', '!**/.git/*' }
|
return { '--hidden', '--glob', '!**/.git/*' }
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
grep_string = {
|
grep_string = {
|
||||||
additional_args = function()
|
additional_args = function()
|
||||||
return { '--hidden', '--glob', '!**/.git/*' }
|
return { '--hidden', '--glob', '!**/.git/*' }
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
-- note: remove the 'builtin.' prefix.
|
-- note: remove the 'builtin.' prefix.
|
||||||
["lsp_references"] = { wrap_results = true, },
|
["lsp_references"] = { wrap_results = true, },
|
||||||
["lsp_definitions"] = { wrap_results = true, },
|
["lsp_definitions"] = { wrap_results = true, },
|
||||||
["diagnostics"] = { wrap_results = true, },
|
["diagnostics"] = { wrap_results = true, },
|
||||||
["find_files"] = { wrap_results = true, },
|
["find_files"] = { wrap_results = true, },
|
||||||
["buffers"] = { sort_mru = true, ignore_current_buffer = true },
|
["buffers"] = { sort_mru = true, ignore_current_buffer = true },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end,
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
-- Shows context of code line
|
-- Shows context of code line
|
||||||
-- Docs: https://github.com/nvim-treesitter/nvim-treesitter-context
|
-- Docs: https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter-context"
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,48 +1,48 @@
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local treesitter = require("nvim-treesitter.configs")
|
local treesitter = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
treesitter.setup({
|
treesitter.setup({
|
||||||
highlight = { enable = true, },
|
highlight = { enable = true, },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
-- language list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
|
-- language list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua",
|
"lua",
|
||||||
"comment",
|
"comment",
|
||||||
"vim",
|
"vim",
|
||||||
"vimdoc",
|
"vimdoc",
|
||||||
"bash",
|
"bash",
|
||||||
"diff",
|
"diff",
|
||||||
"gitignore",
|
"gitignore",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"elixir",
|
"elixir",
|
||||||
"eex",
|
"eex",
|
||||||
"heex",
|
"heex",
|
||||||
"yaml",
|
"yaml",
|
||||||
"html",
|
"html",
|
||||||
"css",
|
"css",
|
||||||
"dockerfile",
|
"dockerfile",
|
||||||
"query",
|
"query",
|
||||||
"hcl",
|
"hcl",
|
||||||
},
|
},
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
init_selection = "<C-space>",
|
init_selection = "<C-space>",
|
||||||
node_incremental = "<C-space>",
|
node_incremental = "<C-space>",
|
||||||
scope_incremental = false,
|
scope_incremental = false,
|
||||||
node_decremental = "<bs>",
|
node_decremental = "<bs>",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
return {
|
return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
init = function()
|
init = function()
|
||||||
vim.o.timeout = true
|
vim.o.timeout = true
|
||||||
vim.o.timeoutlen = 250
|
vim.o.timeoutlen = 250
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
layout = {
|
layout = {
|
||||||
height = { min = 4, max = 25 }, -- min and max height of the columns
|
height = { min = 4, max = 25 }, -- min and max height of the columns
|
||||||
width = { min = 20, max = 50 }, -- min and max width of the columns
|
width = { min = 20, max = 50 }, -- min and max width of the columns
|
||||||
spacing = 3, -- spacing between columns
|
spacing = 3, -- spacing between columns
|
||||||
align = "left", -- align columns left, center or right
|
align = "left", -- align columns left, center or right
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
border = "none", -- none, single, double, shadow
|
border = "none", -- none, single, double, shadow
|
||||||
position = "bottom", -- bottom, top
|
position = "bottom", -- bottom, top
|
||||||
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size.
|
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size.
|
||||||
padding = { 1, 2, 1, 2 }, -- extra window padding [top, right, bottom, left]
|
padding = { 1, 2, 1, 2 }, -- extra window padding [top, right, bottom, left]
|
||||||
winblend = 1, -- value between 0-100 0 for fully opaque and 100 for fully transparent
|
winblend = 1, -- value between 0-100 0 for fully opaque and 100 for fully transparent
|
||||||
zindex = 1000, -- positive value to position WhichKey above other floating windows.
|
zindex = 1000, -- positive value to position WhichKey above other floating windows.
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue