Merge branch 'main' into feature-nvim-navic

This commit is contained in:
qwjyh 2024-04-05 12:25:51 +09:00
commit 17513d7cee
4 changed files with 35 additions and 101 deletions

View file

@ -55,7 +55,6 @@ New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\init.lua -Target (Res
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\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
New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\lua\lspconfig\server_configurations\jetls.lua -Target (Resolve-Path .\dotfiles\neovim\lua\lspconfig\server_configurations\jetls.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)
New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\nvim\after\ftplugin\tex.lua -Target (Resolve-Path .\dotfiles\neovim\after\ftplugin\tex.lua) New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\nvim\after\ftplugin\tex.lua -Target (Resolve-Path .\dotfiles\neovim\after\ftplugin\tex.lua)

View file

@ -27,7 +27,6 @@ ln -sf $(pwd)/dotfiles/neovim/lua/lualine_setup.lua ~/.config/nvim/lua/lualine_s
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
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
ln -sf $(pwd)/dotfiles/neovim/lua/lspconfig/server_configurations/jetls.lua ~/.config/nvim/lua/lspconfig/server_configurations/jetls.lua
mkdir -p ~/.config/nvim/after/ftplugin mkdir -p ~/.config/nvim/after/ftplugin
ln -sf $(pwd)/dotfiles/neovim/after/ftplugin/satysfi.lua ~/.config/nvim/after/ftplugin/satysfi.lua ln -sf $(pwd)/dotfiles/neovim/after/ftplugin/satysfi.lua ~/.config/nvim/after/ftplugin/satysfi.lua
ln -sf $(pwd)/dotfiles/neovim/after/ftplugin/tex.lua ~/.config/nvim/after/ftplugin/tex.lua ln -sf $(pwd)/dotfiles/neovim/after/ftplugin/tex.lua ~/.config/nvim/after/ftplugin/tex.lua

View file

@ -29,6 +29,9 @@ require('lazy').setup({
}, -- Color scheme }, -- Color scheme
{ {
dir = "./lua/term_powershell.lua", dir = "./lua/term_powershell.lua",
cond = function()
return vim.fn.has('win32') == 1
end,
event = "CmdlineEnter", event = "CmdlineEnter",
config = function() config = function()
require("term_powershell").setup { require("term_powershell").setup {
@ -70,29 +73,6 @@ require('lazy').setup({
'lervag/vimtex', 'lervag/vimtex',
ft = { 'tex', 'latex' }, ft = { 'tex', 'latex' },
}, },
{
-- 'kdheepak/JET.nvim',
-- 'qwjyh/JET.nvim',
dir = '~/work/julia/JET.nvim',
-- dev = false, -- set true to use dir
lazy = true,
dependencies = {
'jose-elias-alvarez/null-ls.nvim',
},
config = function()
require("jet").setup {
timeout = 15000,
-- disable setup since null-ls doesn't support lspconfig
-- https://github.com/jose-elias-alvarez/null-ls.nvim/commit/656e5cb554fed1eb2f398f325511601fab988ce0
setup_lspconfig = false,
debug = true,
}
end,
-- build process(make environments and add JET.jl)
build =
[[mkdir -p ~/.julia/environments/nvim-null-ls && julia --startup-file=no --project=~/.julia/environments/nvim-null-ls -e 'using Pkg; Pkg.add("JET")']],
-- ft = { 'julia', },
},
{ {
'hkupty/iron.nvim', 'hkupty/iron.nvim',
ft = { 'julia', 'python', 'ruby', 'lua', }, ft = { 'julia', 'python', 'ruby', 'lua', },
@ -116,6 +96,9 @@ require('lazy').setup({
{ {
"mtoohey31/cmp-fish", "mtoohey31/cmp-fish",
ft = 'fish', ft = 'fish',
cond = function()
return vim.fn.has('win32') == 0
end
}, },
}, },
}, },
@ -151,6 +134,12 @@ require('lazy').setup({
'nvim-lua/plenary.nvim' 'nvim-lua/plenary.nvim'
}, },
}, },
{
'nvimtools/none-ls.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
},
},
{ {
'folke/trouble.nvim', 'folke/trouble.nvim',
-- config = function -- config = function
@ -218,9 +207,6 @@ 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()
-- Load treesitter grammer for orgmode
require('orgmode').setup_ts_grammar()
-- Setup treesitter -- Setup treesitter
require('nvim-treesitter.configs').setup({ require('nvim-treesitter.configs').setup({
highlight = { highlight = {
@ -643,8 +629,6 @@ lspconfig.powershell_es.setup {
bundle_path = '~/scoop/apps/powershell-editorservice/current', bundle_path = '~/scoop/apps/powershell-editorservice/current',
capabilities = capabilities, capabilities = capabilities,
} }
-- -- jetls
-- lspconfig.jetls.setup {}
-- ccls -- ccls
-- -- csharp -- -- csharp
-- lspconfig.omnisharp.setup { -- lspconfig.omnisharp.setup {
@ -657,7 +641,19 @@ lspconfig.typst_lsp.setup {
single_file_support = true, single_file_support = true,
} }
local lss = { "pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake", lspconfig.rust_analyzer.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
['rust-analyzer'] = {
check = {
command = "clippy",
}
}
}
}
local lss = { "pyright", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake",
"csharp_ls", "html", "r_language_server", "ruff_lsp", "cssls" } "csharp_ls", "html", "r_language_server", "ruff_lsp", "cssls" }
for _, ls in pairs(lss) do for _, ls in pairs(lss) do
lspconfig[ls].setup { lspconfig[ls].setup {
@ -666,6 +662,14 @@ for _, ls in pairs(lss) do
} }
end end
-- none-ls
local null_ls = require('null-ls')
null_ls.setup {
sources = {
null_ls.builtins.diagnostics.fish,
}
}
-- nvim-cmp setup -- nvim-cmp setup
local cmp = require 'cmp' local cmp = require 'cmp'
local luasnip = require 'luasnip' local luasnip = require 'luasnip'
@ -686,8 +690,8 @@ cmp.setup {
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down ['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
['<C-Space>'] = cmp.mapping.complete(), ['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm { ['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace, behavior = cmp.ConfirmBehavior.Insert,
select = true, select = false,
}, },
['<Tab>'] = cmp.mapping(function(fallback) ['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then

View file

@ -1,68 +0,0 @@
-- local cmd = {
-- 'julia',
-- '--startup-file=no',
-- '--history-file=no',
-- '-e',
-- [[
-- # Load JETLS.jl: attempt to load from ~/.julia/environments/nvim-lspconfig
-- # with the regular load path as a fallback
-- jet_install_path = joinpath(
-- get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),
-- "environments", "nvim-lspconfig"
-- )
-- pushfirst!(LOAD_PATH, jet_install_path)
-- using JETLS
-- popfirst!(LOAD_PATH)
-- depot_path = get(ENV, "JULIA_DEPOT_PATH", "")
-- project_path = let
-- dirname(something(
-- ## 1. Finds an explicitly set project (JULIA_PROJECT)
-- Base.load_path_expand((
-- p = get(ENV, "JULIA_PROJECT", nothing);
-- p === nothing ? nothing : isempty(p) ? nothing : p
-- )),
-- ## 2. Look for a Project.toml file in the current working directory,
-- ## or parent directories, with $HOME as an upper boundary
-- Base.current_project(),
-- ## 3. First entry in the load path
-- get(Base.load_path(), 1, nothing),
-- ## 4. Fallback to default global environment,
-- ## this is more or less unreachable
-- Base.load_path_expand("@v#.#"),
-- ))
-- end
-- @info "Running JETLS language server" VERSION pwd() project_path
-- @info "not running yet"
-- JETLS.runserver(stdin, stdout)
-- ]],
-- }
local cmd = {
'julia',
'--startup-file=no',
'--history-file=no',
'-e',
[[
println("===STARTING JETLS===")
using JETLS
JETLS.runserver(stdin, stdout)
@info "Running JETLS" VERSION pwd() project_path
@info "============================"
]],
}
return {
default_config = {
cmd = cmd,
filetypes = { 'julia' },
root_dir = function(fname)
local util = require 'lspconfig.util'
return util.root_pattern 'Project.toml' (fname) or util.find_git_ancestor(fname) or
util.path.dirname(fname)
end,
},
docs = {
description = [[
TBW
]],
},
}