mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
changes
This commit is contained in:
parent
af3ae9b490
commit
e07d6b2aab
5 changed files with 67 additions and 50 deletions
|
|
@ -19,8 +19,12 @@ in
|
||||||
vimdiff = {
|
vimdiff = {
|
||||||
trustExitCode = true;
|
trustExitCode = true;
|
||||||
};
|
};
|
||||||
|
keepBackup = false;
|
||||||
|
};
|
||||||
|
merge = {
|
||||||
|
tool = "vimdiff";
|
||||||
|
|
||||||
};
|
};
|
||||||
merge = { tool = "vimdiff"; };
|
|
||||||
safe = {
|
safe = {
|
||||||
directory = [
|
directory = [
|
||||||
"/etc/nixos"
|
"/etc/nixos"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "top",
|
"position": "top",
|
||||||
"output": "HDMI-A-1",
|
"output": "HDMI-A-1",
|
||||||
"modules-left": [ "custom/logo", "clock", "custom/weather", "custom/blockheight", "custom/price", "memory", "cpu" ],
|
"modules-left": [ "custom/logo", "clock", "custom/blockheight", "custom/price", "memory", "cpu" ],
|
||||||
"modules-center": [ "hyprland/workspaces" ],
|
"modules-center": [ "hyprland/workspaces" ],
|
||||||
"modules-right": [ "tray", "pulseaudio", "network" ],
|
"modules-right": [ "tray", "pulseaudio", "network" ],
|
||||||
"reload_style_on_change":true,
|
"reload_style_on_change":true,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,14 @@ return {
|
||||||
|
|
||||||
hi LazyH1 ctermbg=Green ctermfg=Black guibg=Black guifg=Green
|
hi LazyH1 ctermbg=Green ctermfg=Black guibg=Black guifg=Green
|
||||||
hi IblScope guibg=NONE guifg=Yellow ctermbg=NONE ctermfg=Yellow
|
hi IblScope guibg=NONE guifg=Yellow ctermbg=NONE ctermfg=Yellow
|
||||||
|
|
||||||
|
hi ConflictMarker ctermfg=red guifg=red
|
||||||
|
match ConflictMarker /<<<<<<< HEAD\|=======\|>>>>>>> .\+/
|
||||||
|
|
||||||
|
hi DiffAdd ctermbg=none guibg=none
|
||||||
|
hi DiffChange ctermbg=none guibg=none
|
||||||
|
hi DiffDelete ctermbg=none guibg=none
|
||||||
|
hi DiffText ctermbg=none guibg=none
|
||||||
]])
|
]])
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,4 @@ return {
|
||||||
{ "williamboman/mason.nvim", enabled = false },
|
{ "williamboman/mason.nvim", enabled = false },
|
||||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||||
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
||||||
{ "catppuccin/nvim", enabled = false },
|
|
||||||
{ "folke/flash.nvim", enabled = false },
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
|
||||||
local servers = {
|
local servers = {
|
||||||
"ts_ls",
|
"ts_ls",
|
||||||
"pyright",
|
"pyright",
|
||||||
"nil_ls",
|
"nil_ls",
|
||||||
"cssls",
|
"cssls",
|
||||||
"html",
|
"html",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"marksman",
|
"marksman",
|
||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
"bashls",
|
"bashls",
|
||||||
"clangd",
|
"clangd",
|
||||||
"jsonls",
|
"jsonls",
|
||||||
"vuels",
|
"vuels",
|
||||||
|
|
@ -21,7 +21,7 @@ return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require('nvim-treesitter.configs').setup ({
|
require('nvim-treesitter.configs').setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua",
|
"lua",
|
||||||
"c",
|
"c",
|
||||||
|
|
@ -54,46 +54,46 @@ return {
|
||||||
|
|
||||||
{
|
{
|
||||||
"m4xshen/autoclose.nvim",
|
"m4xshen/autoclose.nvim",
|
||||||
config = function ()
|
config = function()
|
||||||
require("autoclose").setup()
|
require("autoclose").setup()
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
--{
|
--{
|
||||||
-- "nvim-treesitter/nvim-treesitter-context",
|
-- "nvim-treesitter/nvim-treesitter-context",
|
||||||
-- dependencies = { "nvim-treesitter/nvim-treesitter" },
|
-- dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
-- config = function()
|
-- config = function()
|
||||||
-- require("treesitter-context").setup({
|
-- require("treesitter-context").setup({
|
||||||
-- enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
-- enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
-- max_lines = 3, -- How many lines the window should span. Values <= 0 mean no limit.
|
-- max_lines = 3, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
-- min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
-- min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||||
-- line_numbers = false,
|
-- line_numbers = false,
|
||||||
-- multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line
|
-- multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line
|
||||||
-- trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
-- trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||||
-- mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
-- mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||||
-- -- Separator between context and content. Should be a single character string, like '-'.
|
-- -- Separator between context and content. Should be a single character string, like '-'.
|
||||||
-- -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
-- -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||||
-- separator = "=",
|
-- separator = "x",
|
||||||
-- zindex = 20, -- The Z-index of the context window
|
-- zindex = 20, -- The Z-index of the context window
|
||||||
-- on_attach = nil, -- (fun(buf: integer): boolean) rurn false to disable attaching
|
-- on_attach = nil, -- (fun(buf: integer): boolean) rurn false to disable attaching
|
||||||
-- })
|
-- })
|
||||||
-- end,
|
-- end,
|
||||||
--},
|
--},
|
||||||
|
|
||||||
{
|
{
|
||||||
"VonHeikemen/lsp-zero.nvim",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
branch = "v2.x",
|
branch = "v2.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "neovim/nvim-lspconfig" },
|
{ "neovim/nvim-lspconfig" },
|
||||||
|
|
||||||
{ "hrsh7th/nvim-cmp" },
|
{ "hrsh7th/nvim-cmp" },
|
||||||
{ "hrsh7th/cmp-buffer" },
|
{ "hrsh7th/cmp-buffer" },
|
||||||
{ "hrsh7th/cmp-path" },
|
{ "hrsh7th/cmp-path" },
|
||||||
{ "hrsh7th/cmp-nvim-lsp" },
|
{ "hrsh7th/cmp-nvim-lsp" },
|
||||||
|
|
||||||
{ "L3MON4D3/LuaSnip" },
|
{ "L3MON4D3/LuaSnip" },
|
||||||
},
|
},
|
||||||
config = function ()
|
config = function()
|
||||||
local lsp = require('lsp-zero').preset({})
|
local lsp = require('lsp-zero').preset({})
|
||||||
lsp.setup_servers(servers)
|
lsp.setup_servers(servers)
|
||||||
lsp.setup()
|
lsp.setup()
|
||||||
|
|
@ -127,7 +127,6 @@ return {
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require('luasnip').lsp_expand(args.body)
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -162,15 +161,17 @@ return {
|
||||||
|
|
||||||
for _, server in ipairs(servers) do
|
for _, server in ipairs(servers) do
|
||||||
lsp[server].setup {
|
lsp[server].setup {
|
||||||
|
-- Prevent LSP from autostarting
|
||||||
|
autostart = false,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
navic.attach(client,bufnr)
|
navic.attach(client, bufnr)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
lsp.lua_ls.setup{
|
lsp.lua_ls.setup {
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
|
|
@ -180,7 +181,13 @@ return {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
require("which-key").add({
|
require("which-key").add({
|
||||||
{ "<leader>cl", ":LspInfo<CR>", desc = "LSP Info" },
|
{ "<leader>cs", group = "LSP Commands" },
|
||||||
|
{ "<leader>cf", ":LspFormat<CR>", desc = "Code Format" },
|
||||||
|
{ "<leader>csi", ":LspInfo<CR>", desc = "LSP Info" },
|
||||||
|
{ "<leader>csl", ":LspLog<CR>", desc = "LSP Log" },
|
||||||
|
{ "<leader>csr", ":LspRestart<CR>", desc = "LSP Restart" },
|
||||||
|
{ "<leader>css", ":LspStart<CR>", desc = "LSP Start" },
|
||||||
|
{ "<leader>csx", ":LspStop<CR>", desc = "LSP Stop" },
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue