@@ -10,6 +10,7 @@ in
 | 
			
		||||
{
 | 
			
		||||
    imports = [
 | 
			
		||||
        ./kitty.nix # Terminal
 | 
			
		||||
        ./fileManager.nix
 | 
			
		||||
        ../waybar # Status Bar 
 | 
			
		||||
        ../rofi # App Launcher
 | 
			
		||||
    ];
 | 
			
		||||
 
 | 
			
		||||
@@ -1,37 +0,0 @@
 | 
			
		||||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
 | 
			
		||||
vim.g.mapleader = " "
 | 
			
		||||
 | 
			
		||||
-- bootstrap lazy and all plugins
 | 
			
		||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
 | 
			
		||||
 | 
			
		||||
if not vim.uv.fs_stat(lazypath) then
 | 
			
		||||
  local repo = "https://github.com/folke/lazy.nvim.git"
 | 
			
		||||
  vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
vim.opt.rtp:prepend(lazypath)
 | 
			
		||||
 | 
			
		||||
local lazy_config = require "configs.lazy"
 | 
			
		||||
 | 
			
		||||
-- load plugins
 | 
			
		||||
require("lazy").setup({
 | 
			
		||||
  {
 | 
			
		||||
    "NvChad/NvChad",
 | 
			
		||||
    lazy = false,
 | 
			
		||||
    branch = "v2.5",
 | 
			
		||||
    import = "nvchad.plugins",
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  { import = "plugins" },
 | 
			
		||||
}, lazy_config)
 | 
			
		||||
 | 
			
		||||
-- load theme
 | 
			
		||||
dofile(vim.g.base46_cache .. "defaults")
 | 
			
		||||
dofile(vim.g.base46_cache .. "statusline")
 | 
			
		||||
 | 
			
		||||
require "options"
 | 
			
		||||
require "nvchad.autocmds"
 | 
			
		||||
 | 
			
		||||
vim.schedule(function()
 | 
			
		||||
  require "mappings"
 | 
			
		||||
end)
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
-- This file needs to have same structure as nvconfig.lua
 | 
			
		||||
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
 | 
			
		||||
-- Please read that file to know all available options :(
 | 
			
		||||
 | 
			
		||||
---@type ChadrcConfig
 | 
			
		||||
local M = {}
 | 
			
		||||
 | 
			
		||||
M.base46 = {
 | 
			
		||||
    theme = "radium",
 | 
			
		||||
 | 
			
		||||
    -- hl_override = {
 | 
			
		||||
    -- 	Comment = { italic = true },
 | 
			
		||||
    -- 	["@comment"] = { italic = true },
 | 
			
		||||
    -- },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-- M.nvdash = { load_on_startup = true }
 | 
			
		||||
-- M.ui = {
 | 
			
		||||
--       tabufline = {
 | 
			
		||||
--          lazyload = false
 | 
			
		||||
--      }
 | 
			
		||||
--}
 | 
			
		||||
 | 
			
		||||
return M
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
local options = {
 | 
			
		||||
    formatters_by_ft = {
 | 
			
		||||
        lua = { "stylua" },
 | 
			
		||||
        -- css = { "prettier" },
 | 
			
		||||
        -- html = { "prettier" },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    format_on_save = {
 | 
			
		||||
        -- These options will be passed to conform.format()
 | 
			
		||||
        timeout_ms = 500,
 | 
			
		||||
        lsp_fallback = true,
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
return options
 | 
			
		||||
@@ -1,47 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  defaults = { lazy = true },
 | 
			
		||||
  install = { colorscheme = { "nvchad" } },
 | 
			
		||||
 | 
			
		||||
  ui = {
 | 
			
		||||
    icons = {
 | 
			
		||||
      ft = "",
 | 
			
		||||
      lazy = " ",
 | 
			
		||||
      loaded = "",
 | 
			
		||||
      not_loaded = "",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  performance = {
 | 
			
		||||
    rtp = {
 | 
			
		||||
      disabled_plugins = {
 | 
			
		||||
        "2html_plugin",
 | 
			
		||||
        "tohtml",
 | 
			
		||||
        "getscript",
 | 
			
		||||
        "getscriptPlugin",
 | 
			
		||||
        "gzip",
 | 
			
		||||
        "logipat",
 | 
			
		||||
        "netrw",
 | 
			
		||||
        "netrwPlugin",
 | 
			
		||||
        "netrwSettings",
 | 
			
		||||
        "netrwFileHandlers",
 | 
			
		||||
        "matchit",
 | 
			
		||||
        "tar",
 | 
			
		||||
        "tarPlugin",
 | 
			
		||||
        "rrhelper",
 | 
			
		||||
        "spellfile_plugin",
 | 
			
		||||
        "vimball",
 | 
			
		||||
        "vimballPlugin",
 | 
			
		||||
        "zip",
 | 
			
		||||
        "zipPlugin",
 | 
			
		||||
        "tutor",
 | 
			
		||||
        "rplugin",
 | 
			
		||||
        "syntax",
 | 
			
		||||
        "synmenu",
 | 
			
		||||
        "optwin",
 | 
			
		||||
        "compiler",
 | 
			
		||||
        "bugreport",
 | 
			
		||||
        "ftplugin",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,21 +0,0 @@
 | 
			
		||||
local lint = require("lint")
 | 
			
		||||
 | 
			
		||||
lint.linters_by_ft = {
 | 
			
		||||
    lua = { "luacheck" },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
lint.linters.luacheck.args = {
 | 
			
		||||
    "--globals",
 | 
			
		||||
    "vim",
 | 
			
		||||
    "--formatter",
 | 
			
		||||
    "plain",
 | 
			
		||||
    "--codes",
 | 
			
		||||
    "--ranges",
 | 
			
		||||
    "-",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
 | 
			
		||||
    callback = function()
 | 
			
		||||
        lint.try_lint()
 | 
			
		||||
    end,
 | 
			
		||||
})
 | 
			
		||||
@@ -1,57 +0,0 @@
 | 
			
		||||
-- load defaults i.e lua_lsp
 | 
			
		||||
local on_attach = require("nvchad.configs.lspconfig").on_attach
 | 
			
		||||
local on_init = require("nvchad.configs.lspconfig").on_init
 | 
			
		||||
local capabilities = require("nvchad.configs.lspconfig").capabilities
 | 
			
		||||
 | 
			
		||||
local lspconfig = require("lspconfig")
 | 
			
		||||
 | 
			
		||||
-- List of all servers configured
 | 
			
		||||
lspconfig.servers = {
 | 
			
		||||
    "lua_ls",
 | 
			
		||||
    "templ",
 | 
			
		||||
    "jedi_language_server",
 | 
			
		||||
    --    "gopls",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-- List of servers configured with default config
 | 
			
		||||
local default_servers = {
 | 
			
		||||
    "templ",
 | 
			
		||||
    --    "gopls",
 | 
			
		||||
    "jedi_language_server",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
-- lsps with default config
 | 
			
		||||
for _, lsp in ipairs(default_servers) do
 | 
			
		||||
    lspconfig[lsp].setup({
 | 
			
		||||
        on_attach = on_attach,
 | 
			
		||||
        on_init = on_init,
 | 
			
		||||
        capabilities = capabilities,
 | 
			
		||||
    })
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Lua LSP
 | 
			
		||||
lspconfig.lua_ls.setup({
 | 
			
		||||
    on_attach = on_attach,
 | 
			
		||||
    on_init = on_init,
 | 
			
		||||
    capabilities = capabilities,
 | 
			
		||||
 | 
			
		||||
    settings = {
 | 
			
		||||
        Lua = {
 | 
			
		||||
            diagnostics = {
 | 
			
		||||
                enable = false, -- Disable all diagnostics from lua_ls
 | 
			
		||||
                -- globals = { "vim" }
 | 
			
		||||
            },
 | 
			
		||||
            workspace = {
 | 
			
		||||
                library = {
 | 
			
		||||
                    vim.fn.expand("$VIMRUNTIME/lua"),
 | 
			
		||||
                    vim.fn.expand("$VIMRUNTIME/lua/vim/lsp"),
 | 
			
		||||
                    vim.fn.stdpath("data") .. "/lazy/ui/nvchad_types",
 | 
			
		||||
                    vim.fn.stdpath("data") .. "/lazy/lazy.nvim/lua/lazy",
 | 
			
		||||
                    --"${3rd}/love2d/library",
 | 
			
		||||
                },
 | 
			
		||||
                maxPreload = 100000,
 | 
			
		||||
                preloadFileSize = 10000,
 | 
			
		||||
            },
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
})
 | 
			
		||||
@@ -1,4 +0,0 @@
 | 
			
		||||
require("mason-conform").setup({
 | 
			
		||||
    -- List of formatters to ignore during install
 | 
			
		||||
    ignore_install = {},
 | 
			
		||||
})
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
local lint = package.loaded["lint"]
 | 
			
		||||
 | 
			
		||||
local ignore_install = {}
 | 
			
		||||
 | 
			
		||||
local function table_contains(table, value)
 | 
			
		||||
    for _, v in ipairs(table) do
 | 
			
		||||
        if v == value then
 | 
			
		||||
            return true
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
    return false
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local all_linters = {}
 | 
			
		||||
for _, v in pairs(lint.linters_by_ft) do
 | 
			
		||||
    for _, linter in ipairs(v) do
 | 
			
		||||
        if not table_contains(ignore_install, linter) then
 | 
			
		||||
            table.insert(all_linters, linter)
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
require("mason-nvim-lint").setup({
 | 
			
		||||
    ensure_installed = all_linters,
 | 
			
		||||
    automatic_installation = false,
 | 
			
		||||
})
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
local lspconfig = package.loaded["lspconfig"]
 | 
			
		||||
 | 
			
		||||
local ignore_install = {}
 | 
			
		||||
 | 
			
		||||
local function table_contains(table, value)
 | 
			
		||||
    for _, v in ipairs(table) do
 | 
			
		||||
        if v == value then
 | 
			
		||||
            return true
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
    return false
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local all_servers = {}
 | 
			
		||||
for _, s in ipairs(lspconfig.servers) do
 | 
			
		||||
    if not table_contains(ignore_install, s) then
 | 
			
		||||
        table.insert(all_servers, s)
 | 
			
		||||
    end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
require("mason-lspconfig").setup({
 | 
			
		||||
    ensure_installed = all_servers,
 | 
			
		||||
    automatic_installation = false,
 | 
			
		||||
})
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
local options = {
 | 
			
		||||
    ensure_installed = {
 | 
			
		||||
        "bash",
 | 
			
		||||
        "fish",
 | 
			
		||||
        "lua",
 | 
			
		||||
        "luadoc",
 | 
			
		||||
        "markdown",
 | 
			
		||||
        "printf",
 | 
			
		||||
        "toml",
 | 
			
		||||
        "vim",
 | 
			
		||||
        "vimdoc",
 | 
			
		||||
        "yaml",
 | 
			
		||||
        -- Languages
 | 
			
		||||
        "python",
 | 
			
		||||
        "templ",
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    highlight = {
 | 
			
		||||
        enable = true,
 | 
			
		||||
        use_languagetree = true,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    indent = { enable = true },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
require("nvim-treesitter.configs").setup(options)
 | 
			
		||||
@@ -1,10 +0,0 @@
 | 
			
		||||
require "nvchad.mappings"
 | 
			
		||||
 | 
			
		||||
-- add yours here
 | 
			
		||||
 | 
			
		||||
local map = vim.keymap.set
 | 
			
		||||
 | 
			
		||||
map("n", ";", ":", { desc = "CMD enter command mode" })
 | 
			
		||||
map("i", "jk", "<ESC>")
 | 
			
		||||
 | 
			
		||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
 | 
			
		||||
@@ -1,7 +0,0 @@
 | 
			
		||||
require("nvchad.options")
 | 
			
		||||
 | 
			
		||||
-- add yours here!
 | 
			
		||||
local o = vim.o
 | 
			
		||||
o.shiftwidth = 4
 | 
			
		||||
o.tabstop = 4
 | 
			
		||||
o.softtabstop = 4
 | 
			
		||||
@@ -1,70 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "nvim-treesitter/nvim-treesitter",
 | 
			
		||||
        event = { "BufReadPre", "BufNewFile" },
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("configs.treesitter")
 | 
			
		||||
        end,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "mfussenegger/nvim-lint",
 | 
			
		||||
        event = { "BufReadPre", "BufNewFile" },
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("configs.lint")
 | 
			
		||||
        end,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    -- {
 | 
			
		||||
    --     "rshkarin/mason-nvim-lint",
 | 
			
		||||
    --     event = "VeryLazy",
 | 
			
		||||
    --     config = function()
 | 
			
		||||
    --         require("config.mason-lint")
 | 
			
		||||
    --     end,
 | 
			
		||||
    -- },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "stevearc/conform.nvim",
 | 
			
		||||
        event = "BufWritePre", -- uncomment for format on save
 | 
			
		||||
        opts = require("configs.conform"),
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "zapling/mason-conform.nvim",
 | 
			
		||||
        event = "VeryLazy",
 | 
			
		||||
        dependencies = { "conform.nvim" },
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("configs.mason-conform")
 | 
			
		||||
        end,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "neovim/nvim-lspconfig",
 | 
			
		||||
        event = { "BufReadPre", "BufNewFile" },
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("nvchad.configs.lspconfig").defaults()
 | 
			
		||||
            require("configs.lspconfig")
 | 
			
		||||
        end,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "williamboman/mason-lspconfig.nvim",
 | 
			
		||||
        event = "VeryLazy",
 | 
			
		||||
        dependencies = { "nvim-lspconfig" },
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("configs.mason-lspconfig")
 | 
			
		||||
        end,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "salkin-mada/openscad.nvim",
 | 
			
		||||
        config = function()
 | 
			
		||||
            vim.g.openscad_load_snippets = true
 | 
			
		||||
            vim.g.openscad_default_mappings = true
 | 
			
		||||
            vim.g.openscad_auto_open = true
 | 
			
		||||
            require("openscad")
 | 
			
		||||
        end,
 | 
			
		||||
        dependencies = { "L3MON4D3/LuaSnip", "junegunn/fzf.vim" },
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
@@ -4,7 +4,11 @@
 | 
			
		||||
  catppuccin-bat,
 | 
			
		||||
  ...
 | 
			
		||||
}: {
 | 
			
		||||
  #home.packages = with pkgs; [];
 | 
			
		||||
  home.packages = with pkgs; [
 | 
			
		||||
    # docker
 | 
			
		||||
    docker-compose
 | 
			
		||||
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  programs = {
 | 
			
		||||
    tmux = {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +0,0 @@
 | 
			
		||||
{ pkgs, ... }: {
 | 
			
		||||
 | 
			
		||||
    virtualisation.docker = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        rootless = {
 | 
			
		||||
            enable = true;
 | 
			
		||||
            setSockettVariable = true;
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        daemon.settings = {
 | 
			
		||||
            data-root = "/docker/containers";
 | 
			
		||||
            userland-proxy = false;
 | 
			
		||||
            experimental = true;
 | 
			
		||||
            metrics-addr = "0.0.0.0:9323";
 | 
			
		||||
            ipv6 = true;
 | 
			
		||||
            fixed-cidr-v6 = "fd00::/80";
 | 
			
		||||
        };
 | 
			
		||||
    };
 | 
			
		||||
    users.extraGroups.docker.members = [ "username-with-access-to-socket" ];
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  config,
 | 
			
		||||
  ...
 | 
			
		||||
}: {
 | 
			
		||||
    programs.neovim = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        defaultEditor = true;
 | 
			
		||||
        viAlias = true;
 | 
			
		||||
        vimAlias = true;
 | 
			
		||||
        vimdiffAlias = true;
 | 
			
		||||
 | 
			
		||||
        plugins = with pkgs.vimPlugins; [
 | 
			
		||||
            nvim-tree-lua
 | 
			
		||||
            nvim-treesitter
 | 
			
		||||
            nvim-treesitter.withAllGrammars
 | 
			
		||||
        ];
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user