Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .config/nvim/lazy-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 14 additions & 12 deletions .config/nvim/lua/plugins/avante-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ return {
opts = {
provider = "copilot",
-- auto_suggestions_provider = "copilot",
-- behaviour = {
-- enable_cursor_planning_mode = true,
-- },
behaviour = {
enable_cursor_planning_mode = true,
real_time_inline_suggestions = true, -- Enables inline suggestions for text editing
suggestion_preview = {
interactive = true, -- Use Telescope for interactive suggestion previews
style = {
border = "rounded", -- Rounded border for previews
highlight = "CursorLine", -- Highlight active line in preview
},
},
fallback_providers = { "copilot", "ollama" }, -- Fallback mechanism if primary provider fails
},
providers = {
copilot = {
model = "claude-3.7-sonnet",
model = "gpt-4o-2024-11-20",
},
ollama = {
endpoint = "http://localhost:11434",
Expand All @@ -29,14 +38,7 @@ return {
"nvim-telescope/telescope.nvim",
"ibhagwan/fzf-lua",
"nvim-tree/nvim-web-devicons",
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({})
end,
},
"zbirenbaum/copilot.lua",
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
Expand Down
38 changes: 15 additions & 23 deletions .config/nvim/lua/plugins/lsp/nvim-lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@ return {
config = function()
local capabilities = require("blink.cmp").get_lsp_capabilities()

-- Simple servers with default config
local simple_servers = {
"bashls",
"dockerls",
"prismals",
"purescriptls",
"pyright",
"tailwindcss",
}
vim.lsp.config("*", { capabilities = capabilities })

-- Servers with custom config
local custom_servers = {
Expand All @@ -27,27 +19,27 @@ return {
ts_ls = "typescript",
}

local lspconfig = require("lspconfig")
local helpers = require("core.helpers")

-- Setup servers with default config
for _, server in ipairs(simple_servers) do
lspconfig[server].setup({ capabilities = capabilities })
end

-- Setup servers with custom config
for server, config_name in pairs(custom_servers) do
local ok, custom_config =
pcall(require, "plugins.lsp.lang." .. config_name)

if ok then
lspconfig[server].setup(
helpers.merge(
custom_config,
{ capabilities = capabilities }
)
)
vim.lsp.config(server, custom_config)
end
end

vim.lsp.enable({
"bashls",
"dockerls",
"hls",
"lua_ls",
"nil_ls",
"prismals",
"purescriptls",
"pyright",
"tailwindcss",
"ts_ls",
})
end,
}
41 changes: 13 additions & 28 deletions .config/nvim/lua/plugins/venv-selector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,20 @@ return {
"linux-cultist/venv-selector.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"nvim-telescope/telescope.nvim",
"mfussenegger/nvim-dap-python",
"mfussenegger/nvim-dap",
"mfussenegger/nvim-dap-python", --optional
{
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = { "nvim-lua/plenary.nvim" },
},
},
config = function()
require("venv-selector").setup({
-- Your options go here
-- name = "venv",
-- auto_refresh = false
stay_on_this_version = true,
})

vim.api.nvim_create_autocmd({ "VimEnter", "BufEnter" }, {
desc = "Auto select virtualenv Nvim open",
pattern = "*",
callback = function()
local venv =
vim.fn.findfile("pyproject.toml", vim.fn.getcwd() .. ";")
if venv ~= "" then
require("venv-selector").retrieve_from_cache()
end
end,
once = true,
})
end,
event = "VeryLazy", -- Optional: needed only if you want to type `:VenvSelect` without a keymapping
ft = "python", -- Load when opening Python files
keys = {
-- Keymap to open VenvSelector to pick a venv.
{ "<leader>vs", "<cmd>VenvSelect<cr>" },
-- Keymap to retrieve the venv from a cache (the one previously used for the same project directory).
{ "<leader>vc", "<cmd>VenvSelectCached<cr>" },
{ ",v", "<cmd>VenvSelect<cr>" }, -- Open picker on keymap
},
opts = { -- this can be an empty lua table - just showing below for clarity.
search = {}, -- if you add your own searches, they go here.
options = {}, -- if you add plugin options, they go here.
},
}
33 changes: 17 additions & 16 deletions .config/xmonad/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/yaml_configuration/
# https://docs.haskellstack.org/en/stable/configure/yaml/

# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A 'specific' Stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
# snapshot: lts-23.0
# snapshot: nightly-2024-12-13
# snapshot: ghc-9.8.4
#
# The location of a snapshot can be provided as a file or url. Stack assumes
# a snapshot provided as a file might change, whereas a url resource does not.
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/9.yaml
# snapshot: ./custom-snapshot.yaml
# snapshot: https://example.com/snapshots/2024-01-01.yaml
snapshot:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/4.yaml

# User packages to be built.
# Various formats can be used as shown in the example below.
Expand All @@ -32,7 +32,7 @@ resolver:
packages:
- xmonad
- xmonad-contrib
# Dependency packages to be pulled from upstream that are not in the resolver.
# Dependency packages to be pulled from upstream that are not in the snapshot.
# These entries can reference officially published versions as well as
# forks / in-progress versions pinned to a git hash. For example:
#
Expand All @@ -42,10 +42,11 @@ packages:
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
#
# extra-deps: []
#
dependencies:
- split-0.2.3.5
- split-0.2.5

# Override default flag values for local packages and extra-deps
# Override default flag values for project packages and extra-deps
# flags: {}

# Extra package databases containing global packages
Expand All @@ -54,15 +55,15 @@ dependencies:
# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# Require a specific version of Stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=2.5"
# require-stack-version: ">=3.3"
#
# Override the architecture used by stack, especially useful on Windows
# Override the architecture used by Stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# Extra directories used by Stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on: [push]

jobs:
xmonad:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt install -y libx11-dev libxft-dev libxinerama-dev libxrandr-dev libxss-dev haskell-stack

- name: Fetch xmonad and xmonad-contrib
run: |
cd .config/xmonad
git clone --branch v0.18.0 https://github.com/xmonad/xmonad
git clone --branch v0.18.1 https://github.com/xmonad/xmonad-contrib

- name: Build xmonad
run: |
cd .config/xmonad
stack install --allow-newer

- name: Build xmonad.hs
run: |
cd .config/xmonad
stack install split
stack ghc -- \
--make xmonad.hs \
-i \
-ilib \
-fforce-recomp \
-main-is main \
-v0 \
-o "$1"
8 changes: 7 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ RUN apt-get install -y \
sudo \
zsh

# Install xmonad dependencies
RUN sudo apt-get install -y \
git \
haskell-stack \
libx11-dev libxft-dev libxinerama-dev libxrandr-dev libxss-dev

# Add don't require password for test in sudoers
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

Expand All @@ -34,7 +40,7 @@ RUN echo 'export ZDOTDIR=$HOME/.config/zsh' >> /etc/zsh/zshenv
RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes

# Install nvim stable
RUN curl -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb -o nvim.deb
RUN curl -L https://github.com/neovim/neovim-releases/releases/download/v0.11.3/nvim-linux-x86_64.deb -o nvim.deb
RUN dpkg -i nvim.deb
RUN rm -fr nvim.deb

Expand Down
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:rolling

ENV DEBIAN_FRONTEND noninteractive
ENV USER test
ENV DEBIAN_FRONTEND=noninteractive
ENV USER=test

RUN useradd test
RUN usermod -aG sudo test
Expand All @@ -24,6 +24,12 @@ RUN apt-get install -y \
sudo \
zsh

# Install xmonad dependencies
RUN sudo apt-get install -y \
git \
haskell-stack \
libx11-dev libxft-dev libxinerama-dev libxrandr-dev libxss-dev

# Add don't require password for test in sudoers
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

Expand All @@ -34,7 +40,7 @@ RUN echo 'export ZDOTDIR=$HOME/.config/zsh' >> /etc/zsh/zshenv
RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes

# Install nvim stable
RUN curl -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb -o nvim.deb
RUN curl -L https://github.com/neovim/neovim-releases/releases/download/v0.11.3/nvim-linux-x86_64.deb -o nvim.deb
RUN dpkg -i nvim.deb
RUN rm -fr nvim.deb

Expand Down