Many updates
This commit is contained in:
@@ -110,13 +110,14 @@ gestures {
|
|||||||
|
|
||||||
input {
|
input {
|
||||||
touchpad {
|
touchpad {
|
||||||
disable_while_typing=true
|
disable_while_typing=false
|
||||||
drag_lock=false
|
drag_lock=false
|
||||||
middle_button_emulation=true
|
middle_button_emulation=true
|
||||||
natural_scroll=true
|
natural_scroll=true
|
||||||
scroll_factor=0.500000
|
scroll_factor=0.500000
|
||||||
tap-to-click=true
|
tap-to-click=true
|
||||||
}
|
}
|
||||||
|
|
||||||
follow_mouse=1
|
follow_mouse=1
|
||||||
kb_layout=us
|
kb_layout=us
|
||||||
kb_model=
|
kb_model=
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
background {
|
background {
|
||||||
blur_passes=2
|
blur_passes=2
|
||||||
blur_size=8
|
blur_size=8
|
||||||
path=$HOME/pictures/.wallpapers/bloody_snow.jpg
|
path=$HOME/pictures/.wallpapers/green-forest.png
|
||||||
}
|
}
|
||||||
|
|
||||||
general {
|
general {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
require("liamm")
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
local nnoremap = require("liamm.keymap").nnoremap
|
local nnoremap = require("liamm.keymap").nnoremap
|
||||||
|
|
||||||
nnoremap("<leader>pv", "<cmd>Ex<CR>")
|
nnoremap("<leader>pv", "<cmd>Ex<CR>")
|
||||||
nnoremap("<leader>tv", "<cmd>ToggleTerm<CR>")
|
|
||||||
nnoremap("<leader>tt", "<cmd>TSContextToggle<CR>")
|
nnoremap("<leader>tt", "<cmd>TSContextToggle<CR>")
|
||||||
|
|
||||||
vim.keymap.set("v", "<leader>ss", ":CarbonNow<CR>", { silent = true })
|
vim.keymap.set("v", "<leader>ss", ":CarbonNow<CR>", { silent = true })
|
||||||
@@ -1 +1,2 @@
|
|||||||
require("liamm")
|
require("liamm.lazy")
|
||||||
|
require("liamm.core")
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
local remap = require("liamm.core.keymap")
|
||||||
|
local nnoremap = remap.nnoremap
|
||||||
|
local vnoremap = remap.vnoremap
|
||||||
|
|
||||||
|
-- Normal Mode Mappings
|
||||||
|
nnoremap("<leader>pv", "<cmd>Ex<CR>")
|
||||||
|
nnoremap("<leader>tt", "<cmd>TSContextToggle<CR>")
|
||||||
|
nnoremap("J", "mzJ`z")
|
||||||
|
nnoremap("<C-d>", "<C-d>zz")
|
||||||
|
nnoremap("<C-u>", "<C-u>zz")
|
||||||
|
nnoremap("n", "nzzzv")
|
||||||
|
nnoremap("N", "Nzzzv")
|
||||||
|
nnoremap("<leader>bg", "<C-z>")
|
||||||
|
nnoremap("<leader>y", "\"+y")
|
||||||
|
nnoremap("<leader>Y", "\"+Y")
|
||||||
|
nnoremap("<leader>x", "<cmd>!chmod +x %<CR>", {silent = true})
|
||||||
|
|
||||||
|
nnoremap("<leader>w", "<C-w>")
|
||||||
|
|
||||||
|
nnoremap("<leader>qq", ":x<CR>")
|
||||||
|
nnoremap("<leader>.", ":find ~/")
|
||||||
|
nnoremap("<leader>oc", ":find ~/.config/nvim/lua/liamm/core/binds.lua<CR>")
|
||||||
|
nnoremap("<leader>bs", ":lua Build()<CR>")
|
||||||
|
|
||||||
|
-- Visual Mode Mappings
|
||||||
|
vnoremap("K", ":m '<-2<CR>gv=gv")
|
||||||
|
vnoremap("J", ":m '>+1<CR>gv=gv")
|
||||||
|
vnoremap("<leader>y", "\"+y")
|
||||||
|
|
||||||
|
-- BUILD SCRIPT INVOKATIONS
|
||||||
|
-- generic build function
|
||||||
|
local function set(list)
|
||||||
|
local _set = {}
|
||||||
|
for _, l in ipairs(list) do
|
||||||
|
_set[l] = true
|
||||||
|
end
|
||||||
|
return _set
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO: add support for passing flags
|
||||||
|
function Build()
|
||||||
|
local out_buf = vim.api.nvim_create_buf(false, true)
|
||||||
|
|
||||||
|
local build_scripts = set(vim.fs.find({ "build.sh", "build.zig", "build.bat" }, { upward = true, type = "file", path = "." }))
|
||||||
|
local output = "[No Build Output]"
|
||||||
|
|
||||||
|
if build_scripts['build.zig'] then
|
||||||
|
vim.cmd('echo "Running build.zig"')
|
||||||
|
output = vim.fn.system({ 'zig', 'build' })
|
||||||
|
else
|
||||||
|
if jit.os == 'Windows' and build_scripts['build.bat'] then
|
||||||
|
output = vim.fn.system({ 'build', '' })
|
||||||
|
elseif build_scripts['build.sh'] then
|
||||||
|
output = vim.fn.system({ './build.sh', '' })
|
||||||
|
else
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, {"[ Build Output ]"})
|
||||||
|
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, vim.split(output, '\n'))
|
||||||
|
|
||||||
|
local window = vim.api.nvim_open_win(out_buf, false, {
|
||||||
|
split = 'right',
|
||||||
|
win = 0,
|
||||||
|
width = math.floor(vim.o.columns * 0.35),
|
||||||
|
style = 'minimal',
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_current_win(window)
|
||||||
|
|
||||||
|
-- Keybind to close the window on pressing Enter
|
||||||
|
vim.api.nvim_buf_set_keymap(out_buf, 'n', '<CR>', '', {
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
callback = function()
|
||||||
|
vim.api.nvim_win_close(window, true)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
require("liamm.core.binds")
|
||||||
|
require("liamm.core.keymap")
|
||||||
|
require("liamm.core.options")
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function bind(op, outer_opts)
|
||||||
|
outer_opts = outer_opts or {noremap = true}
|
||||||
|
return function(lhs, rhs, opts)
|
||||||
|
opts = vim.tbl_extend("force",
|
||||||
|
outer_opts,
|
||||||
|
opts or {}
|
||||||
|
)
|
||||||
|
vim.keymap.set(op, lhs, rhs, opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
M.nmap = bind("n", {noremap = false})
|
||||||
|
M.nnoremap = bind("n")
|
||||||
|
M.vnoremap = bind("v")
|
||||||
|
M.xnoremap = bind("x")
|
||||||
|
M.inoremap = bind("i")
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
local opt = vim.opt
|
||||||
|
|
||||||
|
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
|
||||||
|
|
||||||
|
opt.cursorline = true
|
||||||
|
opt.expandtab = true
|
||||||
|
opt.fillchars = {
|
||||||
|
foldopen = "",
|
||||||
|
foldclose = "",
|
||||||
|
fold = " ",
|
||||||
|
foldsep = " ",
|
||||||
|
diff = "╱",
|
||||||
|
eob = " ",
|
||||||
|
}
|
||||||
|
opt.foldlevel = 99
|
||||||
|
opt.grepformat = "%f:%l:%c:%m"
|
||||||
|
opt.grepprg = "rg --vimgrep"
|
||||||
|
opt.ignorecase = true
|
||||||
|
opt.hlsearch = false
|
||||||
|
opt.incsearch = true
|
||||||
|
opt.inccommand = "nosplit"
|
||||||
|
opt.jumpoptions = "view"
|
||||||
|
opt.laststatus = 3
|
||||||
|
opt.linebreak = true
|
||||||
|
opt.mouse = "a"
|
||||||
|
opt.pumblend = 10
|
||||||
|
opt.pumheight = 10
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
opt.ruler = false
|
||||||
|
opt.scrolloff = 4
|
||||||
|
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
|
||||||
|
opt.shiftround = true
|
||||||
|
opt.shiftwidth = 2
|
||||||
|
opt.shortmess:append({ W = true, I = true, c = true, C = true })
|
||||||
|
opt.showmode = false
|
||||||
|
opt.sidescrolloff = 8
|
||||||
|
opt.signcolumn = "yes"
|
||||||
|
opt.smartcase = true
|
||||||
|
opt.smartindent = true
|
||||||
|
opt.spelllang = { "en" }
|
||||||
|
opt.splitbelow = true
|
||||||
|
opt.splitkeep = "screen"
|
||||||
|
opt.splitright = true
|
||||||
|
opt.tabstop = 2
|
||||||
|
opt.termguicolors = true
|
||||||
|
opt.timeoutlen = vim.g.vscode and 1000 or 300
|
||||||
|
opt.undofile = true
|
||||||
|
opt.undolevels = 10000
|
||||||
|
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
|
opt.updatetime = 200
|
||||||
|
opt.swapfile = false
|
||||||
|
opt.virtualedit = "block"
|
||||||
|
opt.wildmode = "longest:full,full"
|
||||||
|
opt.winminwidth = 5
|
||||||
|
opt.wrap = true
|
||||||
|
|
||||||
|
if vim.fn.has("nvim-0.10") == 1 then
|
||||||
|
opt.smoothscroll = true
|
||||||
|
opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
|
||||||
|
opt.foldmethod = "expr"
|
||||||
|
opt.foldtext = ""
|
||||||
|
else
|
||||||
|
opt.foldmethod = "indent"
|
||||||
|
opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Fix markdown indentation settings
|
||||||
|
vim.g.markdown_recommended_style = 0
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"--branch=stable",
|
||||||
|
lazyrepo,
|
||||||
|
lazypath
|
||||||
|
})
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||||
|
-- loading lazy.nvim so that mappings are correct.
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
{ import = "liamm.plugins" },
|
||||||
|
{ import = "liamm.plugins.lsp" },
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "sonokai" } },
|
||||||
|
checker = { enabled = true, notify = false },
|
||||||
|
change_detection = { notify = false },
|
||||||
|
})
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
return {
|
||||||
|
-- which-key... will setup at some point
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- statup time tracking
|
||||||
|
{
|
||||||
|
"dstein64/vim-startuptime",
|
||||||
|
cmd = "StartupTime",
|
||||||
|
-- init is called during startup. Configuration for vim plugins typically should be set in an init function
|
||||||
|
init = function()
|
||||||
|
vim.g.startuptime_tries = 10
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- completions
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
-- load cmp on InsertEnter
|
||||||
|
event = "InsertEnter",
|
||||||
|
-- these dependencies will only be loaded when cmp loads
|
||||||
|
-- dependencies are always lazy-loaded unless specified otherwise
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
completion = {
|
||||||
|
completeopt = "menu,meuone,preview,noselect",
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-k>'] = cmp.mapping.select_prev_item(),
|
||||||
|
['<C-j>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4), -- scroll preview forward
|
||||||
|
['<C-b>'] = cmp.mapping.scroll_docs(-4), -- scroll preview backward
|
||||||
|
['<C-y>'] = cmp.mapping.confirm({ select = false }),
|
||||||
|
['<C-c>'] = cmp.mapping.abort(),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" }, -- lsp completions
|
||||||
|
{ name = "luasnip" }, -- snippets
|
||||||
|
{ name = "buffer" }, -- text within buffer
|
||||||
|
{ name = "path" }, -- filesystem paths
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- mason
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local mason = require("mason")
|
||||||
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
|
|
||||||
|
mason.setup({})
|
||||||
|
|
||||||
|
mason_lspconfig.setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"lua_ls",
|
||||||
|
"zls",
|
||||||
|
"ols",
|
||||||
|
"rnix",
|
||||||
|
},
|
||||||
|
automatic_installation = true, -- auto-install configured servers
|
||||||
|
automatic_enable = false,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
return {
|
||||||
|
-- the colorscheme should be available when starting Neovim
|
||||||
|
{
|
||||||
|
"sainnhe/sonokai",
|
||||||
|
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||||
|
priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
|
config = function()
|
||||||
|
-- load the colorscheme here
|
||||||
|
vim.cmd([[colorscheme sonokai]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"p00f/alabaster.nvim",
|
||||||
|
name = "alabaster",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Other colorschemes
|
||||||
|
{
|
||||||
|
"karoliskoncevicius/sacredforest-vim",
|
||||||
|
lazy = false,
|
||||||
|
name = "sacredforest"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = true,
|
||||||
|
name = "tokyonight",
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
local map = require("liamm.core.keymap").nnoremap
|
||||||
|
-- return {
|
||||||
|
-- "theprimeagen/harpoon",
|
||||||
|
-- branch = "harpoon2",
|
||||||
|
-- dependencies = {
|
||||||
|
-- "nvim-lua/plenary.nvim",
|
||||||
|
-- },
|
||||||
|
-- lazy = false,
|
||||||
|
-- config = function()
|
||||||
|
-- local harpoon = require("harpoon")
|
||||||
|
--
|
||||||
|
-- ---@diagnostic disable-next-line: missing-parameter
|
||||||
|
-- harpoon:setup()
|
||||||
|
-- map("<leader>a", function() harpoon:list():append() end)
|
||||||
|
-- map("<leader>h", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
-- map("<c-h>", function() harpoon:list():select(1) end)
|
||||||
|
-- map("<c-h>", function() harpoon:list():select(2) end)
|
||||||
|
-- map("<c-h>", function() harpoon:list():select(3) end)
|
||||||
|
-- map("<c-h>", function() harpoon:list():select(4) end)
|
||||||
|
-- end,
|
||||||
|
-- }
|
||||||
|
|
||||||
|
return {
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
---@diagnostic disable-next-line: missing-parameter
|
||||||
|
harpoon:setup()
|
||||||
|
map("<leader>a", function() harpoon:list():add() end)
|
||||||
|
map("<c-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
map("<c-h>", function() harpoon:list():select(1) end)
|
||||||
|
map("<c-j>", function() harpoon:list():select(2) end)
|
||||||
|
map("<c-k>", function() harpoon:list():select(3) end)
|
||||||
|
map("<c-l>", function() harpoon:list():select(4) end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
local map = require("liamm.core.keymap").nnoremap
|
||||||
|
local vmap = require("liamm.core.keymap").vnoremap
|
||||||
|
|
||||||
|
return {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
|
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
local on_attach = function(client, bufnr)
|
||||||
|
opts.buffer = bufnr
|
||||||
|
|
||||||
|
opts.desc = "Show LSP References"
|
||||||
|
map("gR", "<cmd>Telescope lsp_references<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "Go To Declaration"
|
||||||
|
map("gD", vim.lsp.buf.declaration, opts)
|
||||||
|
|
||||||
|
opts.desc = "Show LSP Definition"
|
||||||
|
map("gd", "<cmd>Telescope lsp_definitions<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "Show LSP Type Definitions"
|
||||||
|
map("gt", "<cmd>Telescope lsp_type_definitions<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "Show LSP Implementations"
|
||||||
|
map("gi", "<cmd>Telescope lsp_implementations<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "See Available Code Actions"
|
||||||
|
map("<leader>ca", vim.lsp.buf.code_action, opts)
|
||||||
|
vmap("<leader>ca", vim.lsp.buf.code_action, opts)
|
||||||
|
|
||||||
|
opts.desc = "Smart Rename"
|
||||||
|
map("<leader>rn", vim.lsp.buf.rename, opts)
|
||||||
|
|
||||||
|
opts.desc = "Show Buffer Diagnostics"
|
||||||
|
map("<leader>vD", "<cmd>Telescope diagnostics bufnr=0<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "Show Line Diagnostics"
|
||||||
|
map("<leader>vd", vim.diagnostic.open_float, opts)
|
||||||
|
|
||||||
|
opts.desc = "Go To Prev Diagnostic"
|
||||||
|
map("[d", "<cmd>vim.diagnostic.jump({ count = 1, float = true })<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "Go To Next Diagnostic"
|
||||||
|
map("]d", "<cmd>vim.diagnostic.jump({ count = -1, float = true })<CR>", opts)
|
||||||
|
|
||||||
|
opts.desc = "Show Documentation For Cursor Hover"
|
||||||
|
map("K", vim.lsp.buf.hover, opts)
|
||||||
|
|
||||||
|
opts.desc = "Show Documentation For Cursor Hover"
|
||||||
|
map("<leader>rs", "<cmd>LspRestart<CR>", opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||||
|
|
||||||
|
local signs = {
|
||||||
|
Error = ' ',
|
||||||
|
Warn = ' ',
|
||||||
|
Info = ' ',
|
||||||
|
Hint = 'H',
|
||||||
|
}
|
||||||
|
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||||
|
end
|
||||||
|
|
||||||
|
lspconfig["zls"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig["rnix"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig["lua_ls"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostic = {
|
||||||
|
globals = { "vim" },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
library = {
|
||||||
|
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||||
|
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig["ols"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
single_file_support = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
return {
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
config = function()
|
||||||
|
lualine = require("lualine")
|
||||||
|
lualine.setup({
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = 'auto',
|
||||||
|
component_separators = { left = '|', right = '|'},
|
||||||
|
section_separators = { left = '', right = ''},
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = {},
|
||||||
|
winbar = {},
|
||||||
|
},
|
||||||
|
ignore_focus = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
globalstatus = false,
|
||||||
|
refresh = {
|
||||||
|
statusline = 75,
|
||||||
|
tabline = 10000,
|
||||||
|
winbar = 10000,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { 'mode' },
|
||||||
|
lualine_b = {
|
||||||
|
'branch',
|
||||||
|
'diff',
|
||||||
|
{
|
||||||
|
'diagnostics',
|
||||||
|
--sources = 'nvim_diagnostic'
|
||||||
|
sources = { 'nvim_diagnostic' },
|
||||||
|
|
||||||
|
-- Displays diagnostics for the defined severity types
|
||||||
|
sections = { 'error', 'warn', 'info', 'hint' },
|
||||||
|
diagnostics_color = {
|
||||||
|
-- Same values as the general color option can be used here.
|
||||||
|
error = 'DiagnosticError', -- Changes diagnostics' error color.
|
||||||
|
warn = 'DiagnosticWarn', -- Changes diagnostics' warn color.
|
||||||
|
info = 'DiagnosticInfo', -- Changes diagnostics' info color.
|
||||||
|
hint = 'DiagnosticHint', -- Changes diagnostics' hint color.
|
||||||
|
},
|
||||||
|
symbols = {
|
||||||
|
error = ' ',
|
||||||
|
warn = ' ',
|
||||||
|
info = ' ',
|
||||||
|
hint = 'H'
|
||||||
|
},
|
||||||
|
colored = true, -- Displays diagnostics status in color if set to true.
|
||||||
|
update_in_insert = false, -- Update diagnostics in insert mode.
|
||||||
|
always_visible = false, -- Show diagnostics even if there are none.
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_x = {'encoding', 'filetype'},
|
||||||
|
lualine_y = {'progress'},
|
||||||
|
lualine_z = {'location'}
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
lualine_x = {'location'},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {}
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
---@type snacks.Config
|
||||||
|
opts = {
|
||||||
|
input = { enabled = true },
|
||||||
|
picer = { enabled = true },
|
||||||
|
notifier = { enabled = true },
|
||||||
|
scope = { enabled = true },
|
||||||
|
sroll = { enabled = true },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
return {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
local telescope = require("telescope")
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
|
||||||
|
telescope.setup({
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true,
|
||||||
|
override_generic_sorter = true,
|
||||||
|
override_file_sorter = true,
|
||||||
|
case_mode = smart_case,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
telescope.load_extension("fzf")
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ff", "<cmd>Telescope find_files<CR>", desc = "Find files in cwd" },
|
||||||
|
{ "<leader>fg", "<cmd>Telescope git_files<CR>", desc = "Find git file cwd" },
|
||||||
|
{ "<leader>fr", "<cmd>Telescope oldfiles<CR>", desc = "Find recent files in cwd" },
|
||||||
|
{ "<leader>fs", "<cmd>Telescope live_grep<CR>", desc = "Find string in cwd" },
|
||||||
|
{ "<leader>fc", "<cmd>Telescope grep_string<CR>", desc = "Find string under cursor in cwd" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -253,8 +253,9 @@
|
|||||||
"modules": ["battery", "power-profiles-daemon"],
|
"modules": ["battery", "power-profiles-daemon"],
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
|
"interval": 1,
|
||||||
"states": {
|
"states": {
|
||||||
"good": 95,
|
"good": 90,
|
||||||
"warning": 30,
|
"warning": 30,
|
||||||
"critical": 15
|
"critical": 15
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
allowedTCPPorts = [ 21 22 80 443 4070 ];
|
allowedTCPPorts = [ 21 22 80 443 4070 5037 ];
|
||||||
allowedUDPPorts = [ 4070 ];
|
allowedUDPPorts = [ 4070 ];
|
||||||
|
|
||||||
allowedTCPPortRanges = [
|
allowedTCPPortRanges = [
|
||||||
@@ -86,6 +86,9 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
udev = {
|
||||||
|
packages = [ pkgs.android-udev-rules ];
|
||||||
|
};
|
||||||
|
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
@@ -224,6 +227,7 @@ in
|
|||||||
ripgrep
|
ripgrep
|
||||||
spotify
|
spotify
|
||||||
unzip
|
unzip
|
||||||
|
usbutils
|
||||||
uxplay
|
uxplay
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
fastfetch
|
fastfetch
|
||||||
filezilla
|
filezilla
|
||||||
floorp
|
floorp
|
||||||
|
fzf
|
||||||
genymotion
|
genymotion
|
||||||
gimp
|
gimp
|
||||||
gtk4
|
gtk4
|
||||||
@@ -49,6 +50,8 @@
|
|||||||
swaynotificationcenter
|
swaynotificationcenter
|
||||||
swww
|
swww
|
||||||
texliveFull
|
texliveFull
|
||||||
|
xfce.thunar
|
||||||
|
xfce.thunar-volman
|
||||||
tree
|
tree
|
||||||
waybar
|
waybar
|
||||||
wev
|
wev
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ bat_lvl=$(grep "" /sys/class/power_supply/BAT0/capacity )
|
|||||||
bat_status=$(grep Discharging /sys/class/power_supply/BAT0/status )
|
bat_status=$(grep Discharging /sys/class/power_supply/BAT0/status )
|
||||||
|
|
||||||
if (( $bat_lvl < $bat_alert_lvl )) && [ $bat_status == "Discharging" ]; then
|
if (( $bat_lvl < $bat_alert_lvl )) && [ $bat_status == "Discharging" ]; then
|
||||||
notify-send -a low_battery -u critical "Low Battery" "Connect Power Adapter" -i battery-low -r $notif_id -t 60000
|
notify-send -a low_battery -u critical "Low Battery" "Connect Power Adapter" -i battery-low -r $notif_id -t 1000
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user