fix indentation

This commit is contained in:
Oliver Ladner 2023-11-24 17:40:00 +01:00
commit 00e4d34f5f
10 changed files with 169 additions and 164 deletions

View file

@ -1,4 +1,4 @@
return {
"nvim-tree/nvim-web-devicons",
lazy = true
"nvim-tree/nvim-web-devicons",
lazy = true
}

View file

@ -1,38 +1,38 @@
-- Adds git related signs to the gutter, as well as utilities for managing changes
return {
'lewis6991/gitsigns.nvim',
opts = {
'lewis6991/gitsigns.nvim',
opts = {
-- See `:help gitsigns.txt`
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
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
local gs = package.loaded.gitsigns
vim.keymap.set({ 'n', 'v' }, ']c', function()
if vim.wo.diff then
return ']c'
end
vim.schedule(function()
gs.next_hunk()
end)
return '<Ignore>'
end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' })
vim.keymap.set({ 'n', 'v' }, '[c', function()
if vim.wo.diff then
return '[c'
end
vim.schedule(function()
gs.prev_hunk()
end)
return '<Ignore>'
end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' })
-- don't override the built-in and fugitive keymaps
local gs = package.loaded.gitsigns
vim.keymap.set({ 'n', 'v' }, ']c', function()
if vim.wo.diff then
return ']c'
end
vim.schedule(function()
gs.next_hunk()
end)
return '<Ignore>'
end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' })
vim.keymap.set({ 'n', 'v' }, '[c', function()
if vim.wo.diff then
return '[c'
end
vim.schedule(function()
gs.prev_hunk()
end)
return '<Ignore>'
end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' })
end,
},
},
}

View file

@ -1,13 +1,15 @@
-- status line like vim-airline
return {
"nvim-lualine/lualine.nvim",
opts = {
options = {
icons_enabled = true,
theme = 'auto',
--component_separators = '⋮',
component_separators = '',
section_separators = { left = '', right = '' },
},
},
"nvim-lualine/lualine.nvim",
opts = {
options = {
icons_enabled = true,
theme = 'auto',
--component_separators = '⋮',
component_separators = '',
--section_separators = { left = '', right = '' },
--section_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
},
},
}

View file

@ -1,7 +1,9 @@
return {
'EdenEast/nightfox.nvim',
priority = 1000,
config = function()
vim.cmd.colorscheme 'duskfox'
end,
'EdenEast/nightfox.nvim',
lazy = true,
priority = 1000,
opts = {},
--config = function()
-- vim.cmd.colorscheme 'duskfox'
--end
}

View file

@ -1,4 +1,4 @@
return {
"nvim-telescope/telescope-file-browser.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
"nvim-telescope/telescope-file-browser.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
}

View file

@ -14,6 +14,6 @@ If you have huge amounts of files, consider adding some to `$HOME/.ignore`:
.git/
]]--
return {
"nvim-telescope/telescope-fzf-native.nvim",
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
"nvim-telescope/telescope-fzf-native.nvim",
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
}

View file

@ -1,50 +1,50 @@
-- Telescope
return {
"nvim-telescope/telescope.nvim",
tag = "0.1.4",
dependencies = {
{ "nvim-lua/plenary.nvim" }
},
config = function(lazy, opts)
local telescope = require('telescope')
telescope.load_extension('fzf')
telescope.load_extension('file_browser')
telescope.setup({
defaults = {
sorting_strategy = "ascending",
wrap_result = true,
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.4,
width = 0.75,
height = 0.75,
preview_cutoff = 10,
}
}
},
pickers = {
find_files = {
hidden = true
},
live_grep = {
additional_args = function()
return { '--hidden', '--glob', '!**/.git/*' }
end
},
grep_string = {
additional_args = function()
return { '--hidden', '--glob', '!**/.git/*' }
end
},
-- note: remove the 'builtin.' prefix.
["lsp_references"] = { wrap_results = true, },
["lsp_definitions"] = { wrap_results = true, },
["diagnostics"] = { wrap_results = true, },
["find_files"] = { wrap_results = true, },
["buffers"] = { sort_mru = true, ignore_current_buffer = true },
}
})
end,
"nvim-telescope/telescope.nvim",
tag = "0.1.4",
dependencies = {
{ "nvim-lua/plenary.nvim" }
},
config = function(lazy, opts)
local telescope = require('telescope')
telescope.load_extension('fzf')
telescope.load_extension('file_browser')
telescope.setup({
defaults = {
sorting_strategy = "ascending",
wrap_result = true,
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.4,
width = 0.75,
height = 0.75,
preview_cutoff = 10,
}
}
},
pickers = {
find_files = {
hidden = true
},
live_grep = {
additional_args = function()
return { '--hidden', '--glob', '!**/.git/*' }
end
},
grep_string = {
additional_args = function()
return { '--hidden', '--glob', '!**/.git/*' }
end
},
-- note: remove the 'builtin.' prefix.
["lsp_references"] = { wrap_results = true, },
["lsp_definitions"] = { wrap_results = true, },
["diagnostics"] = { wrap_results = true, },
["find_files"] = { wrap_results = true, },
["buffers"] = { sort_mru = true, ignore_current_buffer = true },
}
})
end
}

View file

@ -1,5 +1,6 @@
-- Shows context of code line
-- Docs: https://github.com/nvim-treesitter/nvim-treesitter-context
return {
"nvim-treesitter/nvim-treesitter-context"
"nvim-treesitter/nvim-treesitter-context",
event = { "BufReadPre", "BufNewFile" },
}

View file

@ -1,48 +1,48 @@
-- Treesitter
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
local treesitter = require("nvim-treesitter.configs")
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
local treesitter = require("nvim-treesitter.configs")
treesitter.setup({
highlight = { enable = true, },
indent = { enable = true },
auto_install = false,
-- language list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
ensure_installed = {
"lua",
"comment",
"vim",
"vimdoc",
"bash",
"diff",
"gitignore",
"markdown",
"markdown_inline",
"elixir",
"eex",
"heex",
"yaml",
"html",
"css",
"dockerfile",
"query",
"hcl",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
})
end,
treesitter.setup({
highlight = { enable = true, },
indent = { enable = true },
auto_install = false,
-- language list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
ensure_installed = {
"lua",
"comment",
"vim",
"vimdoc",
"bash",
"diff",
"gitignore",
"markdown",
"markdown_inline",
"elixir",
"eex",
"heex",
"yaml",
"html",
"css",
"dockerfile",
"query",
"hcl",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
})
end
}

View file

@ -1,24 +1,24 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 250
end,
opts = {
layout = {
height = { min = 4, max = 25 }, -- min and max height of the columns
width = { min = 20, max = 50 }, -- min and max width of the columns
spacing = 3, -- spacing between columns
align = "left", -- align columns left, center or right
},
window = {
border = "none", -- none, single, double, shadow
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.
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
zindex = 1000, -- positive value to position WhichKey above other floating windows.
},
}
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 250
end,
opts = {
layout = {
height = { min = 4, max = 25 }, -- min and max height of the columns
width = { min = 20, max = 50 }, -- min and max width of the columns
spacing = 3, -- spacing between columns
align = "left", -- align columns left, center or right
},
window = {
border = "none", -- none, single, double, shadow
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.
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
zindex = 1000, -- positive value to position WhichKey above other floating windows.
},
}
}