formatted init.lua
This commit is contained in:
parent
278f2b2261
commit
56b6f49a40
1 changed files with 42 additions and 37 deletions
|
@ -29,7 +29,7 @@ require('lazy').setup({
|
|||
{ 'RRethy/vim-illuminate', }, -- highlight keywords under cursor
|
||||
{ -- comment
|
||||
'numToStr/Comment.nvim',
|
||||
config = function ()
|
||||
config = function()
|
||||
require('Comment').setup()
|
||||
end,
|
||||
},
|
||||
|
@ -69,7 +69,8 @@ require('lazy').setup({
|
|||
}
|
||||
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")']],
|
||||
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', },
|
||||
},
|
||||
{
|
||||
|
@ -110,9 +111,9 @@ require('lazy').setup({
|
|||
},
|
||||
{
|
||||
"andymass/vim-matchup",
|
||||
config = function ()
|
||||
config = function()
|
||||
vim.g.matchup_matchparen_offscreen = { method = "popup" }
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
require 'nvim-treesitter.configs'.setup {
|
||||
matchup = {
|
||||
enable = true,
|
||||
}
|
||||
|
@ -180,10 +181,13 @@ vim.cmd.colorscheme "catppuccin"
|
|||
|
||||
-----------------------------------------------------------
|
||||
-- some terminalmode settings
|
||||
vim.keymap.set('t', '<C-w>h', '<C-\\><C-N><C-w>h', { noremap = true, desc = "Exit terminal-mode and move to left window."})
|
||||
vim.keymap.set('t', '<C-w>j', '<C-\\><C-N><C-w>j', { noremap = true, desc = "Exit terminal-mode and move to down window."})
|
||||
vim.keymap.set('t', '<C-w>k', '<C-\\><C-N><C-w>k', { noremap = true, desc = "Exit terminal-mode and move to up window."})
|
||||
vim.keymap.set('t', '<C-w>l', '<C-\\><C-N><C-w>l', { noremap = true, desc = "Exit terminal-mode and move to right window."})
|
||||
vim.keymap.set('t', '<C-w>h', '<C-\\><C-N><C-w>h',
|
||||
{ noremap = true, desc = "Exit terminal-mode and move to left window." })
|
||||
vim.keymap.set('t', '<C-w>j', '<C-\\><C-N><C-w>j',
|
||||
{ noremap = true, desc = "Exit terminal-mode and move to down window." })
|
||||
vim.keymap.set('t', '<C-w>k', '<C-\\><C-N><C-w>k', { noremap = true, desc = "Exit terminal-mode and move to up window." })
|
||||
vim.keymap.set('t', '<C-w>l', '<C-\\><C-N><C-w>l',
|
||||
{ noremap = true, desc = "Exit terminal-mode and move to right window." })
|
||||
|
||||
-----------------------------------------------------------
|
||||
-- to use PowerShell on Windows
|
||||
|
@ -196,7 +200,8 @@ if vim.fn.has('win32') == 1 then
|
|||
else
|
||||
vim.opt.shell = 'powershell'
|
||||
end
|
||||
vim.opt.shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'
|
||||
vim.opt.shellcmdflag =
|
||||
'-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'
|
||||
vim.opt.shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait'
|
||||
vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
|
||||
vim.opt.shellquote = ''
|
||||
|
@ -271,12 +276,12 @@ require('gitsigns').setup {
|
|||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, {expr=true})
|
||||
end, { expr = true })
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, {expr=true})
|
||||
end, { expr = true })
|
||||
end
|
||||
}
|
||||
|
||||
|
@ -303,7 +308,7 @@ parser_config.satysfi = {
|
|||
}
|
||||
|
||||
-- setup
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
require 'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = {
|
||||
'julia',
|
||||
'satysfi',
|
||||
|
@ -444,7 +449,7 @@ lspconfig.lua_ls.setup {
|
|||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {'vim'},
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
|
@ -479,7 +484,7 @@ lspconfig.powershell_es.setup {
|
|||
-- lspconfig.jetls.setup {}
|
||||
-- ccls
|
||||
|
||||
local lss = {"pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake",}
|
||||
local lss = { "pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake", }
|
||||
for _, ls in pairs(lss) do
|
||||
lspconfig[ls].setup {
|
||||
on_attach = on_attach,
|
||||
|
@ -494,7 +499,7 @@ luasnip.config.setup {
|
|||
enable_autosnippets = true,
|
||||
store_selection_key = "<Tab>",
|
||||
}
|
||||
require 'luasnip.loaders.from_lua'.load({paths = './luasnippets'})
|
||||
require 'luasnip.loaders.from_lua'.load({ paths = './luasnippets' })
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
|
|
Loading…
Reference in a new issue