Latest config changes
This commit is contained in:
parent
8782fc7921
commit
35f91760b6
@ -1,13 +0,0 @@
|
|||||||
map <C-b> : w % <Bar> ! make <CR>
|
|
||||||
|
|
||||||
"Some code snippets for filling in
|
|
||||||
inoremap ;d do<Space><CR>end<Space>do<Esc>O<Tab><++><Esc>kA
|
|
||||||
inoremap ;i if<Space>()<Space>then<CR>end<Space>if<Esc>O<Tab><++><Esc>kF(a
|
|
||||||
inoremap ;s select<Space>case(<++>)<CR>case(<++>)<CR><Tab><++><CR><Esc>4hicase(<++>)<CR><Tab><++><CR><Esc>4hiend<Space>select<CR><Esc>5kFsi
|
|
||||||
inoremap ;ph print *, '------------------------------------------------------------'<CR>print *, ''<CR>print *, '------------------------------------------------------------'<Esc>kci'
|
|
||||||
inoremap ;pr read(, *, iostat=iospara) <++><CR>if(iospara>0) then<CR>print *, "Error: Invalid read of <++> with error code", iospara<CR>call mpi_abort(mpi_comm_world, 1, ierr)<CR>end if<ESC>4k0f(a
|
|
||||||
inoremap ;ptp print *, '[OK] - '<ESC>i
|
|
||||||
inoremap ;ptf print *, '[FAILED] - '<ESC>i
|
|
||||||
|
|
||||||
|
|
||||||
set colorcolumn=132
|
|
1
ftplugin/java.vim
Normal file
1
ftplugin/java.vim
Normal file
@ -0,0 +1 @@
|
|||||||
|
set tw=120
|
@ -11,6 +11,9 @@ map <C-b> : w % <Bar> AsyncRun md2pdf "%" <CR>
|
|||||||
map <A-p> : w % <Bar> AsyncRun md2beamer "%" <CR>
|
map <A-p> : w % <Bar> AsyncRun md2beamer "%" <CR>
|
||||||
map <A-b> : w % <Bar> AsyncRun md2docx % <CR>
|
map <A-b> : w % <Bar> AsyncRun md2docx % <CR>
|
||||||
map <C-z> : !zathura %:r.pdf & <CR>
|
map <C-z> : !zathura %:r.pdf & <CR>
|
||||||
|
inoremap ;b ****<esc>hi
|
||||||
|
command Stab Tabularize /\s\+\zs\s/l1c0
|
||||||
|
nnoremap ;t :Tabularize /\s\+\zs\s/l1c0<CR>
|
||||||
set tw=1000
|
set tw=1000
|
||||||
set colorcolumn=
|
set colorcolumn=
|
||||||
|
|
||||||
|
47
init.lua
47
init.lua
@ -213,6 +213,14 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
"godlygeek/tabular",
|
"godlygeek/tabular",
|
||||||
"tpope/vim-sleuth",
|
"tpope/vim-sleuth",
|
||||||
|
{
|
||||||
|
"codersauce/runst.nvim",
|
||||||
|
lazy = false,
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
require("runst").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Vigemus/iron.nvim",
|
"Vigemus/iron.nvim",
|
||||||
ft = { "python" },
|
ft = { "python" },
|
||||||
@ -328,6 +336,9 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
{ -- LSP Configuration & Plugins
|
{ -- LSP Configuration & Plugins
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
autoformat = false,
|
||||||
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Automatically install LSPs and related tools to stdpath for neovim
|
-- Automatically install LSPs and related tools to stdpath for neovim
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
@ -435,6 +446,7 @@ require("lazy").setup({
|
|||||||
"cpp",
|
"cpp",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
yamlls = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
jdtls = {
|
jdtls = {
|
||||||
filetypes = { "java" },
|
filetypes = { "java" },
|
||||||
@ -453,8 +465,13 @@ require("lazy").setup({
|
|||||||
bashls = { dependencies = "shellcheck" },
|
bashls = { dependencies = "shellcheck" },
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
settings = {
|
settings = {
|
||||||
files = {
|
["rust-analyzer"] = {
|
||||||
excludeDirs = { "$HOME", "$HOME/.cargo/**", "$HOME/.rustup/**" },
|
check = {
|
||||||
|
command = "clippy",
|
||||||
|
},
|
||||||
|
rustfmt = {
|
||||||
|
extraArgs = { "+nightly" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -539,6 +556,7 @@ require("lazy").setup({
|
|||||||
"ormolu",
|
"ormolu",
|
||||||
"beautysh",
|
"beautysh",
|
||||||
"latexindent",
|
"latexindent",
|
||||||
|
"prettier",
|
||||||
})
|
})
|
||||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||||
|
|
||||||
@ -548,6 +566,9 @@ require("lazy").setup({
|
|||||||
local server = servers[server_name] or {}
|
local server = servers[server_name] or {}
|
||||||
require("lspconfig")[server_name].setup({
|
require("lspconfig")[server_name].setup({
|
||||||
cmd = server.cmd,
|
cmd = server.cmd,
|
||||||
|
on_init = function(client)
|
||||||
|
client.offset_encoding = "utf-8"
|
||||||
|
end,
|
||||||
settings = server.settings,
|
settings = server.settings,
|
||||||
filetypes = server.filetypes,
|
filetypes = server.filetypes,
|
||||||
-- This handles overriding only values explicitly passed
|
-- This handles overriding only values explicitly passed
|
||||||
@ -575,17 +596,17 @@ require("lazy").setup({
|
|||||||
notify_on_error = false,
|
notify_on_error = false,
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
lsp_fallback = true,
|
lsp_fallback = false,
|
||||||
},
|
},
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
python = { "black" },
|
python = { "black" },
|
||||||
rust = { "rustfmt" },
|
|
||||||
cpp = { "clang-format" },
|
cpp = { "clang-format" },
|
||||||
c = { "clang-format" },
|
c = { "clang-format" },
|
||||||
sh = { "beautysh" },
|
sh = { "beautysh" },
|
||||||
tex = { "latexindent" },
|
tex = { "latexindent" },
|
||||||
|
yaml = { "prettier" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -648,6 +669,19 @@ require("lazy").setup({
|
|||||||
text({ "", "}\\\\", "" }),
|
text({ "", "}\\\\", "" }),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
markdown = {
|
||||||
|
snip({
|
||||||
|
trig = "img",
|
||||||
|
namr = "image",
|
||||||
|
dscr = "Markdown img",
|
||||||
|
}, {
|
||||||
|
text({ ",
|
||||||
|
insert(2),
|
||||||
|
text(")"),
|
||||||
|
}),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -775,7 +809,7 @@ require("lazy").setup({
|
|||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = { enable = false },
|
highlight = { enable = false },
|
||||||
indent = { enable = true },
|
indent = { enable = false },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- There are additional nvim-treesitter modules that you can use to interact
|
-- There are additional nvim-treesitter modules that you can use to interact
|
||||||
@ -786,7 +820,10 @@ require("lazy").setup({
|
|||||||
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
"airblade/vim-gitgutter",
|
||||||
})
|
})
|
||||||
|
--Set rustfmt command
|
||||||
|
vim.g["rustfmt_command"] = "rustfmt +nightly"
|
||||||
--Disable semantic highlights
|
--Disable semantic highlights
|
||||||
for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
|
for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
|
||||||
vim.api.nvim_set_hl(0, group, {})
|
vim.api.nvim_set_hl(0, group, {})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user