mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 15:48:05 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f4ad21ed8 | |||
| 491f733221 | |||
| 6eefbdc965 | |||
| 558b6500d3 | |||
|
|
23a34c1447 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,6 +8,7 @@ config/fzf
|
|||||||
config/cheat/cheatsheets/pure-bash-bible/*
|
config/cheat/cheatsheets/pure-bash-bible/*
|
||||||
config/cheat/cheatsheets/tldr/*
|
config/cheat/cheatsheets/tldr/*
|
||||||
config/git/credentials
|
config/git/credentials
|
||||||
|
config/zsh/.zcompdump
|
||||||
ssh/local.d/*
|
ssh/local.d/*
|
||||||
!ssh/local.d/.gitkeep
|
!ssh/local.d/.gitkeep
|
||||||
!.gitkeep
|
!.gitkeep
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
-- luacheck: globals vim
|
||||||
return {
|
return {
|
||||||
-- Configure AstroNvim updates
|
-- Configure AstroNvim updates
|
||||||
updater = {
|
updater = {
|
||||||
@@ -78,6 +79,29 @@ return {
|
|||||||
-- augroups/autocommands and custom filetypes also this just pure lua so
|
-- augroups/autocommands and custom filetypes also this just pure lua so
|
||||||
-- anything that doesn't fit in the normal config locations above can go here
|
-- anything that doesn't fit in the normal config locations above can go here
|
||||||
polish = function()
|
polish = function()
|
||||||
|
local function yaml_ft(path, bufnr)
|
||||||
|
-- get content of buffer as string
|
||||||
|
local content = vim.filetype.getlines(bufnr)
|
||||||
|
if type(content) == "table" then content = table.concat(content, "\n") end
|
||||||
|
|
||||||
|
-- check if file is in roles, tasks, or handlers folder
|
||||||
|
local path_regex = vim.regex "(tasks\\|roles\\|handlers)/"
|
||||||
|
if path_regex and path_regex:match_str(path) then return "yaml.ansible" end
|
||||||
|
-- check for known ansible playbook text and if found, return yaml.ansible
|
||||||
|
local regex = vim.regex "hosts:\\|tasks:"
|
||||||
|
if regex and regex:match_str(content) then return "yaml.ansible" end
|
||||||
|
|
||||||
|
-- return yaml if nothing else
|
||||||
|
return "yaml"
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.filetype.add {
|
||||||
|
extension = {
|
||||||
|
yml = yaml_ft,
|
||||||
|
yaml = yaml_ft,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
require("notify").setup({
|
require("notify").setup({
|
||||||
background_colour = "#000000",
|
background_colour = "#000000",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,12 +17,33 @@ return {
|
|||||||
end,
|
end,
|
||||||
desc = "Pick to close",
|
desc = "Pick to close",
|
||||||
},
|
},
|
||||||
-- tables with the `name` key will be registered with which-key if it's installed
|
-- tables with the `name` key will be registered with which-key
|
||||||
-- this is useful for naming menus
|
-- if it's installed this is useful for naming menus
|
||||||
["<leader>b"] = { name = "Buffers" },
|
["<leader>b"] = { name = "Buffers" },
|
||||||
-- quick save
|
-- quick save (change description)
|
||||||
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
["<C-s>"] = { ":w!<cr>", desc = "Save File" },
|
||||||
["<leader>P"] = { ":Telescope projects<cr>", desc = "Update Projects listing" },
|
["<leader>P"] = {
|
||||||
|
":Telescope projects<cr>",
|
||||||
|
desc = "Update Projects listing"
|
||||||
|
},
|
||||||
|
-- close_buffers
|
||||||
|
['<leader>bch'] = {
|
||||||
|
"<CMD>lua require('close_buffers').delete({type = 'hidden'})<CR>",
|
||||||
|
desc = "Delete hidden buffers"
|
||||||
|
},
|
||||||
|
-- comment-box
|
||||||
|
["<leader>bb"] = {
|
||||||
|
"<cmd>lua require('comment-box').lbox()<cr>",
|
||||||
|
desc = "Left aligned fixed size box with left aligned text"
|
||||||
|
},
|
||||||
|
["<leader>bc"] = {
|
||||||
|
"<cmd>lua require('comment-box').ccbox()<cr>",
|
||||||
|
desc = "Centered adapted box with centered text"
|
||||||
|
},
|
||||||
|
["<leader>bl"] = {
|
||||||
|
"<cmd>lua require('comment-box').cline()<cr>",
|
||||||
|
desc = "Centered line"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
t = {
|
t = {
|
||||||
-- setting a mapping to false will disable it
|
-- setting a mapping to false will disable it
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
-- luacheck: globals vim
|
||||||
return {
|
return {
|
||||||
-- You can also add new plugins here as well:
|
-- You can also add new plugins here as well:
|
||||||
-- Add plugins, the lazy syntax
|
-- Add plugins, the lazy syntax
|
||||||
@@ -21,6 +22,7 @@ return {
|
|||||||
mode = "cursor", -- cursor, or topline
|
mode = "cursor", -- cursor, or topline
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ "kazhala/close-buffers.nvim" },
|
||||||
{
|
{
|
||||||
"folke/edgy.nvim",
|
"folke/edgy.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
@@ -48,12 +50,13 @@ return {
|
|||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
bottom = {
|
bottom = {
|
||||||
-- toggleterm / lazyterm at the bottom with a height of 40% of the screen
|
-- toggleterm / lazyterm at the bottom with
|
||||||
|
-- a height of 40% of the screen
|
||||||
{
|
{
|
||||||
ft = "toggleterm",
|
ft = "toggleterm",
|
||||||
size = { height = 0.4 },
|
size = { height = 0.4 },
|
||||||
-- exclude floating windows
|
-- exclude floating windows
|
||||||
filter = function(buf, win)
|
filter = function(_, win)
|
||||||
return vim.api.nvim_win_get_config(win).relative == ""
|
return vim.api.nvim_win_get_config(win).relative == ""
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@@ -96,11 +99,6 @@ return {
|
|||||||
pinned = true,
|
pinned = true,
|
||||||
open = "Neotree position=top buffers",
|
open = "Neotree position=top buffers",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ft = "Outline",
|
|
||||||
pinned = true,
|
|
||||||
open = "SymbolsOutlineOpen",
|
|
||||||
},
|
|
||||||
-- any other neo-tree windows
|
-- any other neo-tree windows
|
||||||
"neo-tree",
|
"neo-tree",
|
||||||
},
|
},
|
||||||
|
|||||||
Submodule config/nvim updated: d749be33f6...382b8989f5
Reference in New Issue
Block a user