Compare commits

..

No commits in common. "8be02e755472bf38f96356537753f750af359469" and "c9026eb8429c38f0d76c1b8a26ba22aa8cf7e949" have entirely different histories.

12 changed files with 90 additions and 118 deletions

View file

@ -54,8 +54,6 @@ scoop import .\bin\windows\scoop_apps\scoop_minimal_apps.json
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\init.lua -Target (Resolve-Path .\dotfiles\neovim\init.lua) -Force New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\init.lua -Target (Resolve-Path .\dotfiles\neovim\init.lua) -Force
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lualine_setup.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lualine_setup.lua) -Force New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lualine_setup.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lualine_setup.lua) -Force
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\term_powershell.lua -Target (Resolve-Path .\dotfiles\neovim\lua\term_powershell.lua) -Force New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\term_powershell.lua -Target (Resolve-Path .\dotfiles\neovim\lua\term_powershell.lua) -Force
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lsp_config.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lsp_config.lua) -Force
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\local_settings.lua -Target (Resolve-Path .\dotfiles\neovim\lua\local_settings.lua) -Force
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lspconfig\server_configurations\satysfi_ls.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lspconfig\server_configurations\satysfi_ls.lua) -Force New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lspconfig\server_configurations\satysfi_ls.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lspconfig\server_configurations\satysfi_ls.lua) -Force
mkdir $env:LOCALAPPDATA\nvim\after\ftplugin mkdir $env:LOCALAPPDATA\nvim\after\ftplugin
New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\nvim\after\ftplugin\satysfi.lua -Target (Resolve-Path .\dotfiles\neovim\after\ftplugin\satysfi.lua) New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\nvim\after\ftplugin\satysfi.lua -Target (Resolve-Path .\dotfiles\neovim\after\ftplugin\satysfi.lua)

View file

@ -25,9 +25,7 @@ ln -sf $(pwd)/dotfiles/neovim/init.lua ~/.config/nvim/init.lua
mkdir -p ~/.config/nvim/lua mkdir -p ~/.config/nvim/lua
ln -sf $(pwd)/dotfiles/neovim/lua/lualine_setup.lua ~/.config/nvim/lua/lualine_setup.lua ln -sf $(pwd)/dotfiles/neovim/lua/lualine_setup.lua ~/.config/nvim/lua/lualine_setup.lua
ln -sf $(pwd)/dotfiles/neovim/lua/term_powershell.lua ~/.config/nvim/lua/term_powershell.lua ln -sf $(pwd)/dotfiles/neovim/lua/term_powershell.lua ~/.config/nvim/lua/term_powershell.lua
ln -sf $(pwd)/dotfiles/neovim/lua/lsp_config.lua ~/.config/nvim/lua/lsp_config.lua
ln -sf $(pwd)/dotfiles/neovim/lua/pluto_nvim.lua ~/.config/nvim/lua/pluto_nvim.lua ln -sf $(pwd)/dotfiles/neovim/lua/pluto_nvim.lua ~/.config/nvim/lua/pluto_nvim.lua
ln -sf $(pwd)/dotfiles/neovim/lua/local_settings.lua ~/.config/nvim/lua/local_settings.lua
mkdir -p ~/.config/nvim/lua/lspconfig/server_configurations mkdir -p ~/.config/nvim/lua/lspconfig/server_configurations
ln -sf $(pwd)/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua ~/.config/nvim/lua/lspconfig/server_configurations/satysfi_ls.lua ln -sf $(pwd)/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua ~/.config/nvim/lua/lspconfig/server_configurations/satysfi_ls.lua
mkdir -p ~/.config/nvim/after/ftplugin mkdir -p ~/.config/nvim/after/ftplugin

View file

@ -1,9 +1,8 @@
#!/usr/bin/julia #!/usr/bin/julia
project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig") project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig")
using Pkg
using PackageCompiler;
cd(project_path) do cd(project_path) do
@info "now at " pwd() @info "now at " pwd()
using Pkg
Pkg.activate(".") Pkg.activate(".")
Pkg.update() Pkg.update()
compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line
@ -12,6 +11,7 @@ cd(project_path) do
end |> join end |> join
read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b)) read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b))
@info "compiling sysimage..." @info "compiling sysimage..."
using PackageCompiler;
create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])' create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'
@info "post precompile" @info "post precompile"
run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`) run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`)

View file

@ -1,4 +1,4 @@
# use Catppuccin for bat # use Catppuccin for bat
# https://github.com/catppuccin/bat # https://github.com/catppuccin/bat
# Installation instruction on the readme # Installation instruction on the readme
--theme="Catppuccin Mocha" --theme="Catppuccin Latte"

View file

@ -1 +0,0 @@
lua/local_settings.lua

View file

@ -125,6 +125,14 @@ require('lazy').setup({
}, },
{ {
"andymass/vim-matchup", "andymass/vim-matchup",
config = function()
vim.g.matchup_matchparen_offscreen = { method = "popup" }
require 'nvim-treesitter.configs'.setup {
matchup = {
enable = true,
}
}
end,
}, },
{ {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
@ -188,7 +196,29 @@ require('lazy').setup({
-- see Julian/lean.nvim readme -- see Julian/lean.nvim readme
opts = { opts = {
lsp = { lsp = {
on_attach = require("lsp_config").on_attach, on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
--vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings
-- See `:help vim.lsp.*` for documentation on any of the below function
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'g1', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'grf', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
end,
}, },
mappings = true, mappings = true,
}, },
@ -204,9 +234,18 @@ require('lazy').setup({
}, },
-- event = 'VeryLazy', -- doesn't work with existing comp and treesitter -- event = 'VeryLazy', -- doesn't work with existing comp and treesitter
config = function() config = function()
-- Setup treesitter
require('nvim-treesitter.configs').setup({
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'org' },
},
ensure_installed = { 'org' },
})
-- Setup orgmode -- Setup orgmode
require('orgmode').setup({ require('orgmode').setup({
org_agenda_files = require("local_settings").org_agenda_files, org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org', org_default_notes_file = '~/orgfiles/refile.org',
org_todo_keywords = { org_todo_keywords = {
"TODO(t)", "TODO(t)",
@ -252,9 +291,8 @@ require('lazy').setup({
end, end,
config = function() config = function()
require 'typst-preview'.setup { require 'typst-preview'.setup {
-- Setting this true will enable logging debug information to -- Setting this true will enable printing debug information with print()
-- `vim.fn.stdpath 'data' .. '/typst-preview/log.txt'` debug = false,
debug = true,
-- Custom format string to open the output link provided with %s -- Custom format string to open the output link provided with %s
-- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview' -- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview'
@ -276,8 +314,8 @@ require('lazy').setup({
-- Warning: Be aware that your version might be older than the one -- Warning: Be aware that your version might be older than the one
-- required. -- required.
dependencies_bin = { dependencies_bin = {
['tinymist'] = 'tinymist', ['tinymist'] = nil,
['websocat'] = nil, ['websocat'] = nil
}, },
-- A list of extra arguments (or nil) to be passed to previewer. -- A list of extra arguments (or nil) to be passed to previewer.
@ -354,8 +392,7 @@ vim.keymap.set('n', 'L', '<cmd>tabn<cr>', { desc = 'tab next' })
require('catppuccin').setup({ require('catppuccin').setup({
transparent_background = true, transparent_background = true,
}) })
vim.cmd.colorscheme "catppuccin-mocha" vim.cmd.colorscheme "catppuccin-latte"
-- vim.cmd.colorscheme "catppuccin-latte"
----------------------------------------------------------- -----------------------------------------------------------
vim.g.mapleader = ' ' vim.g.mapleader = ' '
@ -425,7 +462,7 @@ require('gitsigns').setup {
---@param mode string|string[] ---@param mode string|string[]
---@param l string ---@param l string
---@param r any ---@param r any
---@param opts vim.keymap.set.Opts? ---@param opts table?
local function map(mode, l, r, opts) local function map(mode, l, r, opts)
opts = opts or {} opts = opts or {}
opts.buffer = bufnr opts.buffer = bufnr
@ -587,7 +624,30 @@ vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys -- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer -- after the language server attaches to the current buffer
local on_attach = require("lsp_config").on_attach local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
--vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings
-- See `:help vim.lsp.*` for documentation on any of the below function
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'gT', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'g1', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'grf', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
end
-- cmp_nvim_lsp supports additional LSP completion capabilities -- cmp_nvim_lsp supports additional LSP completion capabilities
local capabilities = require("cmp_nvim_lsp").default_capabilities() local capabilities = require("cmp_nvim_lsp").default_capabilities()
@ -628,10 +688,7 @@ if julials_so_file then -- if sysimage doesn't exist, julials_so_file == nil
end end
-- main -- main
lspconfig.julials.setup { lspconfig.julials.setup {
on_attach = function(client, bufnr) on_attach = on_attach,
on_attach(client, bufnr)
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
end,
capabilities = capabilities, capabilities = capabilities,
cmd = { "julia", "--startup-file=no", "--history-file=no", cmd = { "julia", "--startup-file=no", "--history-file=no",
-- julials_so_option[1], julials_so_option[2], -- julials_so_option[1], julials_so_option[2],
@ -674,15 +731,6 @@ lspconfig.julials.setup {
run(server) run(server)
]] } ]] }
} }
-- JETLS
require 'lspconfig.server_configurations.jetls'
lspconfig.jetls.setup {
on_attach = function(client, bufnr)
on_attach(client, bufnr)
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
end,
capabilities = capabilities,
}
-- SATySFi -- SATySFi
require 'lspconfig.server_configurations.satysfi_ls' require 'lspconfig.server_configurations.satysfi_ls'
lspconfig.satysfi_ls.setup { lspconfig.satysfi_ls.setup {
@ -702,7 +750,17 @@ lspconfig.powershell_es.setup {
bundle_path = vim.fn.has('win32') == 1 and win_pwsh_es_path or arch_pwsh_es_path, bundle_path = vim.fn.has('win32') == 1 and win_pwsh_es_path or arch_pwsh_es_path,
capabilities = capabilities, capabilities = capabilities,
} }
-- ccls
-- -- csharp
-- lspconfig.omnisharp.setup {
-- cmd = {'omnisharp'},
-- }
-- lspconfig.typst_lsp.setup {
-- on_attach = on_attach,
-- capabilities = capabilities,
-- single_file_support = true,
-- }
lspconfig.tinymist.setup { lspconfig.tinymist.setup {
on_attach = on_attach, on_attach = on_attach,
@ -733,8 +791,7 @@ lspconfig.rust_analyzer.setup {
} }
local lss = { "pyright", "texlab", --[[ "ccls", ]] "clangd", "ts_ls", --[["tailwindcss"]] "hls", "cmake", local lss = { "pyright", "texlab", --[[ "ccls", ]] "clangd", "ts_ls", --[["tailwindcss"]] "hls", "cmake",
"csharp_ls", "html", "r_language_server", "cssls", "jsonls", "sqls", "vhdl_ls", "ruff", "lemminx", "nixd", "nil_ls", "csharp_ls", "html", "r_language_server", "cssls", "jsonls", "sqls", "vhdl_ls", "ruff", "lemminx" }
"verible", "svls" }
for _, ls in pairs(lss) do for _, ls in pairs(lss) do
lspconfig[ls].setup { lspconfig[ls].setup {
on_attach = on_attach, on_attach = on_attach,

View file

@ -1,37 +0,0 @@
local M = {}
---Add `desc` to bufopts table.
---@param bufopts vim.keymap.set.Opts
---@param desc string
---@return vim.keymap.set.Opts
local function with_desc(bufopts, desc)
return vim.tbl_extend("error", bufopts, { desc = desc })
end
M.on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
--vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings
-- See `:help vim.lsp.*` for documentation on any of the below function
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, with_desc(bufopts, "goto declaration"))
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, with_desc(bufopts, "goto definition"))
vim.keymap.set('n', 'gT', vim.lsp.buf.type_definition, with_desc(bufopts, "goto type definition"))
vim.keymap.set('n', 'K', vim.lsp.buf.hover, with_desc(bufopts, "lsp hover"))
vim.keymap.set('n', 'g1', vim.lsp.buf.implementation, with_desc(bufopts, "lsp implementations"))
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, with_desc(bufopts, "lsp signature help"))
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, with_desc(bufopts, "lsp add_workspace_folder"))
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder,
with_desc(bufopts, "lsp remove_workspace_folder"))
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, with_desc(bufopts, "lsp list_workspace_folders"))
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, with_desc(bufopts, "lsp type definition"))
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, with_desc(bufopts, "lsp rename"))
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, with_desc(bufopts, "lsp code_action"))
vim.keymap.set('n', 'grf', vim.lsp.buf.references, with_desc(bufopts, "lsp references"))
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, with_desc(bufopts, "lsp format"))
end
return M

View file

@ -1,36 +0,0 @@
local configs = require 'lspconfig.configs'
local util = require 'lspconfig.util'
local root_files = { 'Project.toml', 'JuliaProject.toml' }
configs.jetls = {
default_config = {
cmd = {
'julia',
'--project=' .. vim.env.HOME .. '/work/julia/JETLS.jl',
'--startup-file=no',
'--history-file=no',
'-e',
[[
using JETLS
runserver(stdin, stdout)
]]
},
filetypes = { 'julia' },
root_dir = function(fname)
return util.root_pattern(unpack(root_files))(fname)
or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true, })[1])
end,
single_file_support = true,
},
commands = {
-- JuliaActivateEnv = {
-- activate_env
-- }
},
docs = {
description = [[
JETLS: https://github.com/aviatesk/JETLS.jl
]],
},
}

View file

@ -164,8 +164,6 @@ $env:LESS = "-i -M -R -S -W -z-4 -x4"
$env:JL_SYSIMG_PATH = "$HOME/dotfiles/julia-sysimages" $env:JL_SYSIMG_PATH = "$HOME/dotfiles/julia-sysimages"
$env:JL_SYSIMG_PLT = "$HOME/dotfiles/julia-sysimages/sys-plotsmakie.so" $env:JL_SYSIMG_PLT = "$HOME/dotfiles/julia-sysimages/sys-plotsmakie.so"
$env:JL_SYSIMG_ETC = "$HOME/dotfiles/julia-sysimages/sys-etc.so" $env:JL_SYSIMG_ETC = "$HOME/dotfiles/julia-sysimages/sys-etc.so"
# yazi file
$env:YAZI_FILE_ONE = "C:\Program Files\Git\usr\bin\file.exe"
# ============================================================== # ==============================================================

View file

@ -2,7 +2,7 @@ try
using OhMyREPL using OhMyREPL
enable_autocomplete_brackets(false) enable_autocomplete_brackets(false)
include("catppuccin.jl") include("catppuccin.jl")
OhMyREPL.colorscheme!("CatppuccinMocha") OhMyREPL.colorscheme!("CatppuccinLatte")
catch e catch e
@warn "Failed to load OhMyREPL" @warn "Failed to load OhMyREPL"
end end

View file

@ -44,13 +44,11 @@ return {
-- } -- }
-- }, -- },
color_scheme = "iceberg-dark", -- color_scheme = "iceberg-dark",
-- color_scheme = "catppuccin-macchiato", color_scheme = "catppuccin-latte",
-- color_scheme = "catppuccin-latte",
-- color_scheme = "Everforest Dark (Gogh)",
use_fancy_tab_bar = false, use_fancy_tab_bar = false,
tab_bar_at_bottom = true, tab_bar_at_bottom = true,
window_background_opacity = 0.90, window_background_opacity = 0.85,
-- font = wezterm.font 'FirgeNerd Console' -- font = wezterm.font 'FirgeNerd Console'
font = wezterm.font_with_fallback { font = wezterm.font_with_fallback {
{ {

View file

@ -16,9 +16,6 @@ modmap:
Win_L: Win_L:
held: Win_L held: Win_L
alone: Key_Chat alone: Key_Chat
- name: left shift
remap:
Capslock: shift_l
keymap: keymap:
- name: ZenkakuHankaku to Esc - name: ZenkakuHankaku to Esc
remap: remap: