first commit
This commit is contained in:
commit
205faf4224
5471 changed files with 973850 additions and 0 deletions
0
config/nvim/UltiSnips/latex.snippets
Normal file
0
config/nvim/UltiSnips/latex.snippets
Normal file
3
config/nvim/UltiSnips/matlab.snippets
Normal file
3
config/nvim/UltiSnips/matlab.snippets
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
snippet plot "Plot" b
|
||||
plot(#1,#2,'Color',#3,'Linewidth',1.5,'MarkerSize',0,'DisplayName',"#4")
|
||||
endsnippet
|
||||
145
config/nvim/UltiSnips/tex.snippets
Normal file
145
config/nvim/UltiSnips/tex.snippets
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
############## Figures ##############
|
||||
snippet fig "Figure" b
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=\figsize]{figures/$1}
|
||||
\caption{$0}
|
||||
\label{fig:$1}
|
||||
\end{figure}
|
||||
endsnippet
|
||||
|
||||
snippet 2fig "Two Figures" b
|
||||
\begin{figure}
|
||||
\begin{subfigure}{\dfigsize}
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{figures/$2}
|
||||
\caption{$1}
|
||||
\label{fig:$2}
|
||||
\end{subfigure}
|
||||
\hfill
|
||||
\begin{subfigure}{\dfigsize}
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{figures/$4}
|
||||
\caption{$3}
|
||||
\label{fig:$4}
|
||||
\end{subfigure}
|
||||
\caption{$5}
|
||||
\end{figure}
|
||||
endsnippet
|
||||
|
||||
snippet tab "Table" b
|
||||
\begin{table}
|
||||
\centering
|
||||
\begin{tabular}{$1}
|
||||
\hline
|
||||
$4 & & & \\ \hline
|
||||
\end{tabular}
|
||||
\caption{$2}
|
||||
\label{table:$3}
|
||||
\end{table}
|
||||
endsnippet
|
||||
############## Basics ##############
|
||||
snippet env "Environment"
|
||||
\begin{$1}
|
||||
$2
|
||||
\end{$1}
|
||||
endsnippet
|
||||
############## Direct env ##############
|
||||
snippet abs "Abstract" b
|
||||
\begin{abstract}
|
||||
$1
|
||||
\end{abstract}
|
||||
endsnippet
|
||||
|
||||
snippet itm "Environnement itemize" b
|
||||
\begin{${1:itemize}}
|
||||
\item $2
|
||||
\end{$1}
|
||||
endsnippet
|
||||
|
||||
snippet it "Add item" b
|
||||
\item $1
|
||||
endsnippet
|
||||
############## Section ##############
|
||||
snippet sec "sections"
|
||||
\\$1{$2}\label{sec:$3}
|
||||
endsnippet
|
||||
|
||||
############## Disp ##############
|
||||
snippet bold "bold"
|
||||
\textbf{$1}
|
||||
endsnippet
|
||||
|
||||
snippet ital "italique"
|
||||
\textit{$1}
|
||||
endsnippet
|
||||
|
||||
snippet smcap "small caps"
|
||||
\textsc{$1}
|
||||
endsnippet
|
||||
|
||||
snippet _ "undertext"
|
||||
_{$1}
|
||||
endsnippet
|
||||
|
||||
snippet ^ "uptext"
|
||||
^{$1}
|
||||
endsnippet
|
||||
|
||||
############## Maths ##############
|
||||
snippet frac "fraction"
|
||||
\frac{$1}{$2}
|
||||
endsnippet
|
||||
|
||||
snippet cases "cases"
|
||||
\begin{cases}
|
||||
$1
|
||||
\end{cases}
|
||||
endsnippet
|
||||
|
||||
snippet eq "Equation" b
|
||||
\begin{equation}
|
||||
$1
|
||||
\label{eq:${2}}
|
||||
\end{equation}
|
||||
endsnippet
|
||||
|
||||
snippet param "Parameters" b
|
||||
\begin{parameters}
|
||||
$1 & $2
|
||||
\end{parameters}
|
||||
endsnippet
|
||||
|
||||
snippet align "Align" b
|
||||
\begin{align}
|
||||
$1
|
||||
\label{eq:$2}
|
||||
\end{align}
|
||||
endsnippet
|
||||
|
||||
snippet mat "Matrix" b
|
||||
\begin{bmatrix}
|
||||
$1
|
||||
\end{bmatrix}
|
||||
endsnippet
|
||||
############## Citation ##############
|
||||
snippet ref "reference"
|
||||
\ref{$1}
|
||||
endsnippet
|
||||
|
||||
snippet cite "citation"
|
||||
\cite{$1}
|
||||
endsnippet
|
||||
|
||||
############## Siunitz ##############
|
||||
snippet num "Number"
|
||||
\num{$1}
|
||||
endsnippet
|
||||
|
||||
snippet un "Unit"
|
||||
\unit{$1}
|
||||
endsnippet
|
||||
|
||||
snippet quant "Quantity"
|
||||
\qty{$1}{$2}
|
||||
endsnippet
|
||||
2
config/nvim/init.lua
Normal file
2
config/nvim/init.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-- ~/.config/nvim/init.lua
|
||||
require("neoconf")
|
||||
33
config/nvim/lazy-lock.json
Normal file
33
config/nvim/lazy-lock.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" },
|
||||
"Tungsten": { "branch": "main", "commit": "329053bffc28762f2ca29b76405a9687b1747ff7" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "6c6a89d5b068b5251c8bdf0dd57bb921bcfeeb09" },
|
||||
"baleia.nvim": { "branch": "main", "commit": "32617940adb2eea56e85a64883a19961ceac9641" },
|
||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||
"csvview.nvim": { "branch": "main", "commit": "7022e18a0fbae9aecf99a3ba02b2a541edc2b8a1" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"image.nvim": { "branch": "master", "commit": "da2be65c153ba15a14a342b05591652a6df70d58" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" },
|
||||
"markview.nvim": { "branch": "main", "commit": "e27dee8b2a61f89ac3a06deae0264ad1d3f7b62c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
|
||||
"mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" },
|
||||
"neogit": { "branch": "master", "commit": "d1cfc4986195239cac55700b675cea7a9578d430" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4b7fbaa239c5db6b36f424a4521ca9f1a401be33" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "028d9a0695a0cc4cfa893889f8c408ed7ccc8adc" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||
"typst.vim": { "branch": "main", "commit": "1d5436c0f55490893892441c0eca55e6cdf4916c" },
|
||||
"ultisnips": { "branch": "master", "commit": "10fc6cb2a48aa24d72894f71fceaa43a0432f287" },
|
||||
"vimtex": { "branch": "master", "commit": "0f42a5130432d4af2e6fd21fb93a76915ff1f090" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
9
config/nvim/lazyvim.json
Normal file
9
config/nvim/lazyvim.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extras": [
|
||||
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "11866"
|
||||
},
|
||||
"version": 8
|
||||
}
|
||||
42
config/nvim/lua/neoconf/autocmd.lua
Normal file
42
config/nvim/lua/neoconf/autocmd.lua
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
-- (.config/nvim/lua/neoconf/autocmd.lua)
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end,
|
||||
})
|
||||
|
||||
local function run_curr_python_file()
|
||||
-- Get file name in the current buffer
|
||||
local file_name = vim.api.nvim_buf_get_name(0)
|
||||
|
||||
-- Get terminal codes for running python file
|
||||
-- ("i" to enter insert before typing rest of the command)
|
||||
local py_cmd = vim.api.nvim_replace_termcodes('ipython "' .. file_name .. '"<cr>', true, false, true)
|
||||
|
||||
-- Determine terminal window split and launch terminal
|
||||
local percent_of_win = 0.4
|
||||
local curr_win_height = vim.api.nvim_win_get_height(0) -- Current window height
|
||||
local term_height = math.floor(curr_win_height * percent_of_win) -- Terminal height
|
||||
vim.cmd(":below " .. term_height .. "split | term") -- Launch terminal (horizontal split)
|
||||
|
||||
-- Press keys to run python command on current file
|
||||
vim.api.nvim_feedkeys(py_cmd, "t", false)
|
||||
end
|
||||
|
||||
vim.keymap.set({ "n" }, "<A-r>", "", {
|
||||
desc = "Run .py file via Neovim built-in terminal",
|
||||
callback = run_curr_python_file,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "markdown", "rmd" },
|
||||
callback = function()
|
||||
-- Force syntaxe markdown
|
||||
vim.bo.syntax = "markdown"
|
||||
-- Conceal normal pour markdown
|
||||
vim.wo.conceallevel = 2
|
||||
-- Désactive vimtex pour ces fichiers
|
||||
vim.b.vimtex_syntax_enabled = 0
|
||||
end,
|
||||
})
|
||||
76
config/nvim/lua/neoconf/c++.lua
Normal file
76
config/nvim/lua/neoconf/c++.lua
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
-- Function to compile and run the current C++ file
|
||||
function Compile_and_run_cpp()
|
||||
local filename = vim.fn.expand("%:p")
|
||||
local basename = vim.fn.expand("%:r")
|
||||
local output_file = "output.txt" -- Change this to the desired output file name
|
||||
local input_file = "input.txt" -- Change this to the desired input file name
|
||||
|
||||
-- Check if current file is a valid C++ or C file
|
||||
local valid_extensions = { "cpp", "c" }
|
||||
local valid_file = false
|
||||
for _, ext in ipairs(valid_extensions) do
|
||||
if filename:match("%." .. ext .. "$") then
|
||||
valid_file = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- Exit function if file is not valid
|
||||
if not valid_file then
|
||||
vim.api.nvim_err_writeln("Not a valid C++ or C file.")
|
||||
return
|
||||
end
|
||||
|
||||
-- Check if input file exists, create if it doesn't
|
||||
local input_fd = io.open(input_file, "a+") -- Open in append mode to create if it doesn't exist
|
||||
if input_fd == nil then
|
||||
vim.api.nvim_err_writeln("Failed to open or create input file: " .. input_file)
|
||||
return
|
||||
end
|
||||
input_fd:close()
|
||||
|
||||
-- Check if output file exists, create if it doesn't
|
||||
local output_fd = io.open(output_file, "a+") -- Open in append mode to create if it doesn't exist
|
||||
if output_fd == nil then
|
||||
vim.api.nvim_err_writeln("Failed to open or create output file: " .. output_file)
|
||||
return
|
||||
end
|
||||
output_fd:close()
|
||||
|
||||
-- Check if input file buffer is already open
|
||||
local input_bufnr = vim.fn.bufnr(input_file)
|
||||
if input_bufnr == -1 then
|
||||
-- Open input file in a new split at top right side
|
||||
vim.cmd("vsp " .. input_file)
|
||||
else
|
||||
-- Switch to existing buffer for input file
|
||||
vim.cmd(input_bufnr .. "wincmd w")
|
||||
end
|
||||
-- Check if input file buffer is already open
|
||||
local output_butnr = vim.fn.bufnr(output_file)
|
||||
if output_butnr == -1 then
|
||||
-- Open input file in a new split at top right side
|
||||
vim.cmd("split " .. output_file)
|
||||
else
|
||||
-- Switch to existing buffer for input file
|
||||
vim.cmd(input_bufnr .. "wincmd w")
|
||||
end
|
||||
|
||||
vim.cmd("vertical resize 70%")
|
||||
|
||||
local file = vim.fn.bufnr(filename)
|
||||
vim.cmd(file .. "wincmd w")
|
||||
|
||||
-- Compile and run C++ file
|
||||
local compile_cmd =
|
||||
string.format("g++ %s -o %s && ./%s < %s > %s", filename, basename, basename, input_file, output_file)
|
||||
vim.cmd("silent w") -- Save the current file
|
||||
vim.cmd("silent !clear") -- Clear the terminal
|
||||
vim.cmd("silent !" .. compile_cmd) -- Execute the compile and run command
|
||||
|
||||
-- Open the output file in a new buffer
|
||||
-- vim.cmd("edit " .. output_file)
|
||||
end
|
||||
|
||||
-- Map Ctrl+B to the compile_and_run_cpp function
|
||||
vim.api.nvim_set_keymap("n", "<C-b>", ":lua Compile_and_run_cpp()<CR>", { noremap = true, silent = true })
|
||||
11
config/nvim/lua/neoconf/init.lua
Normal file
11
config/nvim/lua/neoconf/init.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- ~/.config/nvim/lua/neoconf/init.lua
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- call every other init files
|
||||
require("neoconf.lazy_init")
|
||||
require("neoconf.settings")
|
||||
require("neoconf.remap")
|
||||
require("neoconf.autocmd")
|
||||
require("neoconf.lsp-config")
|
||||
require("neoconf.plugins_settings")
|
||||
9
config/nvim/lua/neoconf/lazy/alpha.lua
Normal file
9
config/nvim/lua/neoconf/lazy/alpha.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = { "nvim-mini/mini.icons" },
|
||||
config = function()
|
||||
require("alpha").setup(require("alpha.themes.startify").config)
|
||||
end,
|
||||
},
|
||||
}
|
||||
55
config/nvim/lua/neoconf/lazy/blink_cmp.lua
Normal file
55
config/nvim/lua/neoconf/lazy/blink_cmp.lua
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
return {
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "1.*",
|
||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source using latest nightly rust with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||
-- 'enter' for enter to accept
|
||||
-- 'none' for no mappings
|
||||
--
|
||||
-- All presets have the following mappings:
|
||||
-- C-space: Open menu or open docs if already open
|
||||
-- C-n/C-p or Up/Down: Select next/previous item
|
||||
-- C-e: Hide menu
|
||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
keymap = { preset = "default" },
|
||||
|
||||
appearance = {
|
||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- Adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
-- (Default) Only show the documentation popup when manually triggered
|
||||
completion = { documentation = { auto_show = false } },
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
|
||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||
--
|
||||
-- See the fuzzy documentation for more information
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
},
|
||||
}
|
||||
44
config/nvim/lua/neoconf/lazy/conform.lua
Normal file
44
config/nvim/lua/neoconf/lazy/conform.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
return { -- Autoformat
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>f",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_format = "fallback" })
|
||||
end,
|
||||
mode = "",
|
||||
desc = "[F]ormat buffer",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
return nil
|
||||
else
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
}
|
||||
end
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
python = { "isort", "black" },
|
||||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 2000,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
24
config/nvim/lua/neoconf/lazy/csvview.lua
Normal file
24
config/nvim/lua/neoconf/lazy/csvview.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
{
|
||||
"hat0uma/csvview.nvim",
|
||||
---@module "csvview"
|
||||
---@type CsvView.Options
|
||||
opts = {
|
||||
parser = { comments = { "#", "//" } },
|
||||
keymaps = {
|
||||
-- Text objects for selecting fields
|
||||
textobject_field_inner = { "if", mode = { "o", "x" } },
|
||||
textobject_field_outer = { "af", mode = { "o", "x" } },
|
||||
-- Excel-like navigation:
|
||||
-- Use <Tab> and <S-Tab> to move horizontally between fields.
|
||||
-- Use <Enter> and <S-Enter> to move vertically between rows and place the cursor at the end of the field.
|
||||
-- Note: In terminals, you may need to enable CSI-u mode to use <S-Tab> and <S-Enter>.
|
||||
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
|
||||
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
|
||||
jump_next_row = { "<Enter>", mode = { "n", "v" } },
|
||||
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
|
||||
},
|
||||
},
|
||||
cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" },
|
||||
},
|
||||
}
|
||||
9
config/nvim/lua/neoconf/lazy/friendly_snippets.lua
Normal file
9
config/nvim/lua/neoconf/lazy/friendly_snippets.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
opts = {
|
||||
exclude = { "latex" },
|
||||
},
|
||||
},
|
||||
}
|
||||
9
config/nvim/lua/neoconf/lazy/image.lua
Normal file
9
config/nvim/lua/neoconf/lazy/image.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"3rd/image.nvim",
|
||||
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
|
||||
opts = {
|
||||
processor = "magick_cli",
|
||||
},
|
||||
},
|
||||
}
|
||||
23
config/nvim/lua/neoconf/lazy/lualine.lua
Normal file
23
config/nvim/lua/neoconf/lazy/lualine.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = {
|
||||
options = {
|
||||
theme = "nightfly",
|
||||
section_separators = { left = "", right = "" },
|
||||
component_separators = { left = "", right = "" },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { {
|
||||
"mode",
|
||||
fmt = function(str)
|
||||
return str:upper()
|
||||
end,
|
||||
} },
|
||||
lualine_b = { "branch", "diff" },
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "diagnostics" },
|
||||
lualine_y = { "filetype" },
|
||||
lualine_z = { "progress", "location" },
|
||||
},
|
||||
},
|
||||
}
|
||||
17
config/nvim/lua/neoconf/lazy/markdown-preview.lua
Normal file
17
config/nvim/lua/neoconf/lazy/markdown-preview.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- lua/plugins/markview.lua
|
||||
return {
|
||||
"OXY2DEV/markview.nvim",
|
||||
lazy = false,
|
||||
preview = {
|
||||
icon_provider = "internal",
|
||||
},
|
||||
opts = {
|
||||
modes = { "n", "i" },
|
||||
latex = {
|
||||
enable = true,
|
||||
fonts = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
35
config/nvim/lua/neoconf/lazy/mason.lua
Normal file
35
config/nvim/lua/neoconf/lazy/mason.lua
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
return {
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"clangd",
|
||||
"typstyle",
|
||||
"texlab",
|
||||
"lua_ls",
|
||||
"vimls",
|
||||
"marksman",
|
||||
"pyright",
|
||||
"bashls",
|
||||
"cssls",
|
||||
"jsonls",
|
||||
"jdtls",
|
||||
"ts_ls",
|
||||
"html",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
{ "mason-org/mason.nvim", opts = {} },
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
},
|
||||
{
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"black",
|
||||
"isort",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
22
config/nvim/lua/neoconf/lazy/neogit.lua
Normal file
22
config/nvim/lua/neoconf/lazy/neogit.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
|
||||
-- Only one of these is needed.
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
|
||||
-- For a custom log pager
|
||||
"m00qek/baleia.nvim", -- optional
|
||||
|
||||
-- Only one of these is needed.
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
},
|
||||
cmd = "Neogit",
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>Neogit<cr>", desc = "Show Neogit UI" },
|
||||
},
|
||||
},
|
||||
}
|
||||
22
config/nvim/lua/neoconf/lazy/noice.lua
Normal file
22
config/nvim/lua/neoconf/lazy/noice.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-- lazy.nvim
|
||||
return {
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
lsp = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
},
|
||||
-- add any options here
|
||||
},
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- OPTIONAL:
|
||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||
-- If not available, we use `mini` as the fallback
|
||||
--- "rcarriga/nvim-notify",
|
||||
},
|
||||
},
|
||||
}
|
||||
216
config/nvim/lua/neoconf/lazy/oil.lua
Normal file
216
config/nvim/lua/neoconf/lazy/oil.lua
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
return {
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {
|
||||
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
|
||||
-- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
|
||||
default_file_explorer = true,
|
||||
-- Id is automatically added at the beginning, and name at the end
|
||||
-- See :help oil-columns
|
||||
columns = {
|
||||
"icon",
|
||||
-- "permissions",
|
||||
-- "size",
|
||||
-- "mtime",
|
||||
},
|
||||
-- Buffer-local options to use for oil buffers
|
||||
buf_options = {
|
||||
buflisted = false,
|
||||
bufhidden = "hide",
|
||||
},
|
||||
-- Window-local options to use for oil buffers
|
||||
win_options = {
|
||||
wrap = false,
|
||||
signcolumn = "no",
|
||||
cursorcolumn = false,
|
||||
foldcolumn = "0",
|
||||
spell = false,
|
||||
list = false,
|
||||
conceallevel = 3,
|
||||
concealcursor = "nvic",
|
||||
},
|
||||
-- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
|
||||
delete_to_trash = false,
|
||||
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
|
||||
skip_confirm_for_simple_edits = false,
|
||||
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
|
||||
-- (:help prompt_save_on_select_new_entry)
|
||||
prompt_save_on_select_new_entry = true,
|
||||
-- Oil will automatically delete hidden buffers after this delay
|
||||
-- You can set the delay to false to disable cleanup entirely
|
||||
-- Note that the cleanup process only starts when none of the oil buffers are currently displayed
|
||||
cleanup_delay_ms = 2000,
|
||||
lsp_file_methods = {
|
||||
-- Enable or disable LSP file operations
|
||||
enabled = true,
|
||||
-- Time to wait for LSP file operations to complete before skipping
|
||||
timeout_ms = 1000,
|
||||
-- Set to true to autosave buffers that are updated with LSP willRenameFiles
|
||||
-- Set to "unmodified" to only save unmodified buffers
|
||||
autosave_changes = false,
|
||||
},
|
||||
-- Constrain the cursor to the editable parts of the oil buffer
|
||||
-- Set to `false` to disable, or "name" to keep it on the file names
|
||||
constrain_cursor = "editable",
|
||||
-- Set to true to watch the filesystem for changes and reload oil
|
||||
watch_for_changes = false,
|
||||
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
||||
-- Additionally, if it is a string that matches "actions.<name>",
|
||||
-- it will use the mapping at require("oil.actions").<name>
|
||||
-- Set to `false` to remove a keymap
|
||||
-- See :help oil-actions for a list of all available actions
|
||||
keymaps = {
|
||||
["g?"] = { "actions.show_help", mode = "n" },
|
||||
["<CR>"] = "actions.select",
|
||||
["<C-s>"] = { "actions.select", opts = { vertical = true } },
|
||||
["<C-h>"] = { "actions.select", opts = { horizontal = true } },
|
||||
["<C-t>"] = { "actions.select", opts = { tab = true } },
|
||||
["<C-p>"] = "actions.preview",
|
||||
["<C-c>"] = { "actions.close", mode = "n" },
|
||||
["<C-l>"] = "actions.refresh",
|
||||
["-"] = { "actions.parent", mode = "n" },
|
||||
["_"] = { "actions.open_cwd", mode = "n" },
|
||||
["`"] = { "actions.cd", mode = "n" },
|
||||
["g~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" },
|
||||
["gs"] = { "actions.change_sort", mode = "n" },
|
||||
["gx"] = "actions.open_external",
|
||||
["g."] = { "actions.toggle_hidden", mode = "n" },
|
||||
["g\\"] = { "actions.toggle_trash", mode = "n" },
|
||||
},
|
||||
-- Set to false to disable all of the above keymaps
|
||||
use_default_keymaps = true,
|
||||
view_options = {
|
||||
-- Show files and directories that start with "."
|
||||
show_hidden = false,
|
||||
-- This function defines what is considered a "hidden" file
|
||||
is_hidden_file = function(name, bufnr)
|
||||
local m = name:match("^%.")
|
||||
return m ~= nil
|
||||
end,
|
||||
-- This function defines what will never be shown, even when `show_hidden` is set
|
||||
is_always_hidden = function(name, bufnr)
|
||||
return false
|
||||
end,
|
||||
-- Sort file names with numbers in a more intuitive order for humans.
|
||||
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
|
||||
natural_order = "fast",
|
||||
-- Sort file and directory names case insensitive
|
||||
case_insensitive = false,
|
||||
sort = {
|
||||
-- sort order can be "asc" or "desc"
|
||||
-- see :help oil-columns to see which columns are sortable
|
||||
{ "type", "asc" },
|
||||
{ "name", "asc" },
|
||||
},
|
||||
-- Customize the highlight group for the file name
|
||||
highlight_filename = function(entry, is_hidden, is_link_target, is_link_orphan)
|
||||
return nil
|
||||
end,
|
||||
},
|
||||
-- Extra arguments to pass to SCP when moving/copying files over SSH
|
||||
extra_scp_args = {},
|
||||
-- Extra arguments to pass to aws s3 when creating/deleting/moving/copying files using aws s3
|
||||
extra_s3_args = {},
|
||||
-- EXPERIMENTAL support for performing file operations with git
|
||||
git = {
|
||||
-- Return true to automatically git add/mv/rm files
|
||||
add = function(path)
|
||||
return false
|
||||
end,
|
||||
mv = function(src_path, dest_path)
|
||||
return false
|
||||
end,
|
||||
rm = function(path)
|
||||
return false
|
||||
end,
|
||||
},
|
||||
-- Configuration for the floating window in oil.open_float
|
||||
float = {
|
||||
-- Padding around the floating window
|
||||
padding = 2,
|
||||
-- max_width and max_height can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
max_width = 0,
|
||||
max_height = 0,
|
||||
border = nil,
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
-- optionally override the oil buffers window title with custom function: fun(winid: integer): string
|
||||
get_win_title = nil,
|
||||
-- preview_split: Split direction: "auto", "left", "right", "above", "below".
|
||||
preview_split = "auto",
|
||||
-- This is the config that will be passed to nvim_open_win.
|
||||
-- Change values here to customize the layout
|
||||
override = function(conf)
|
||||
return conf
|
||||
end,
|
||||
},
|
||||
-- Configuration for the file preview window
|
||||
preview_win = {
|
||||
-- Whether the preview window is automatically updated when the cursor is moved
|
||||
update_on_cursor_moved = true,
|
||||
-- How to open the preview window "load"|"scratch"|"fast_scratch"
|
||||
preview_method = "fast_scratch",
|
||||
-- A function that returns true to disable preview on a file e.g. to avoid lag
|
||||
disable_preview = function(filename)
|
||||
return false
|
||||
end,
|
||||
-- Window-local options to use for preview window buffers
|
||||
win_options = {},
|
||||
},
|
||||
-- Configuration for the floating action confirmation window
|
||||
confirmation = {
|
||||
-- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
-- min_width and max_width can be a single value or a list of mixed integer/float types.
|
||||
-- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
|
||||
max_width = 0.9,
|
||||
-- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
|
||||
min_width = { 40, 0.4 },
|
||||
-- optionally define an integer/float for the exact width of the preview window
|
||||
width = nil,
|
||||
-- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
-- min_height and max_height can be a single value or a list of mixed integer/float types.
|
||||
-- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
|
||||
max_height = 0.9,
|
||||
-- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
|
||||
min_height = { 5, 0.1 },
|
||||
-- optionally define an integer/float for the exact height of the preview window
|
||||
height = nil,
|
||||
border = nil,
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
-- Configuration for the floating progress window
|
||||
progress = {
|
||||
max_width = 0.9,
|
||||
min_width = { 40, 0.4 },
|
||||
width = nil,
|
||||
max_height = { 10, 0.9 },
|
||||
min_height = { 5, 0.1 },
|
||||
height = nil,
|
||||
border = nil,
|
||||
minimized_border = "none",
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
-- Configuration for the floating SSH window
|
||||
ssh = {
|
||||
border = nil,
|
||||
},
|
||||
-- Configuration for the floating keymaps help window
|
||||
keymaps_help = {
|
||||
border = nil,
|
||||
},
|
||||
},
|
||||
-- Optional dependencies
|
||||
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
|
||||
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
|
||||
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
|
||||
lazy = false,
|
||||
},
|
||||
}
|
||||
5
config/nvim/lua/neoconf/lazy/plenary.lua
Normal file
5
config/nvim/lua/neoconf/lazy/plenary.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
}
|
||||
5
config/nvim/lua/neoconf/lazy/quickmath.lua
Normal file
5
config/nvim/lua/neoconf/lazy/quickmath.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
{
|
||||
"jbyuki/quickmath.nvim",
|
||||
},
|
||||
}
|
||||
10
config/nvim/lua/neoconf/lazy/telescope.lua
Normal file
10
config/nvim/lua/neoconf/lazy/telescope.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- optional but recommended
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
},
|
||||
},
|
||||
}
|
||||
8
config/nvim/lua/neoconf/lazy/tokyonight.lua
Normal file
8
config/nvim/lua/neoconf/lazy/tokyonight.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
39
config/nvim/lua/neoconf/lazy/treesitter.lua
Normal file
39
config/nvim/lua/neoconf/lazy/treesitter.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
{ -- Highlight, edit, and navigate code
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"c++",
|
||||
"matlab",
|
||||
"regex",
|
||||
"octave",
|
||||
"yaml",
|
||||
"python",
|
||||
"latex",
|
||||
"typst",
|
||||
"zsh",
|
||||
"markdown_inline",
|
||||
"typst",
|
||||
"comment",
|
||||
"bash",
|
||||
"c",
|
||||
"html",
|
||||
"lua",
|
||||
"markdown",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
},
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
||||
-- If you are experiencing weird indenting issues, add the language to
|
||||
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
||||
additional_vim_regex_highlighting = { "ruby", "markdown" },
|
||||
},
|
||||
indent = { enable = true, disable = { "ruby, markdown" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
14
config/nvim/lua/neoconf/lazy/tungsten.lua
Normal file
14
config/nvim/lua/neoconf/lazy/tungsten.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
{
|
||||
"B1gum/Tungsten",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim", -- Optional
|
||||
"folke/which-key.nvim", -- Optional
|
||||
},
|
||||
build = "./scripts/install_python_deps.sh", -- This automates the packaging!
|
||||
opts = {
|
||||
backend = "python",
|
||||
},
|
||||
},
|
||||
}
|
||||
5
config/nvim/lua/neoconf/lazy/typst.lua
Normal file
5
config/nvim/lua/neoconf/lazy/typst.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
"kaarmu/typst.vim",
|
||||
ft = "typst",
|
||||
lazy = false,
|
||||
}
|
||||
5
config/nvim/lua/neoconf/lazy/ultisnip.lua
Normal file
5
config/nvim/lua/neoconf/lazy/ultisnip.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
{
|
||||
"SirVer/ultisnips",
|
||||
},
|
||||
}
|
||||
18
config/nvim/lua/neoconf/lazy/vimtex.lua
Normal file
18
config/nvim/lua/neoconf/lazy/vimtex.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = false, -- we don't want to lazy load VimTeX
|
||||
-- tag = "v2.15", -- uncomment to pin to a specific release
|
||||
init = function()
|
||||
-- VimTeX configuration goes here, e.g.
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_complete_close_brace = 1
|
||||
vim.g.vimtex_format_enabled = 1
|
||||
vim.g.vimtex_imaps_enabled = 0
|
||||
vim.g.vimtex_complete_enabled = 0
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
aux_dir = vim.fn.expand("~/.aux-tex/"),
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
20
config/nvim/lua/neoconf/lazy/whichkey.lua
Normal file
20
config/nvim/lua/neoconf/lazy/whichkey.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
21
config/nvim/lua/neoconf/lazy_init.lua
Normal file
21
config/nvim/lua/neoconf/lazy_init.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- (~/.config/nvim/lua/neoconf/lazy_init.lua)
|
||||
-- lazy is the package manager used for this nvim config
|
||||
--
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = "neoconf.lazy",
|
||||
change_detection = { notify = false },
|
||||
})
|
||||
26
config/nvim/lua/neoconf/lsp-config.lua
Normal file
26
config/nvim/lua/neoconf/lsp-config.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable servers (mason-lspconfig handles this automatically for installed ones)
|
||||
-- vim.lsp.enable("lua_ls")
|
||||
|
||||
-- diagnostic
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
prefix = "●", -- Icône avant le message
|
||||
source = "if_many", -- Affiche la source LSP si plusieurs
|
||||
format = function(diag)
|
||||
return string.format("%s: %s", diag.source, diag.message)
|
||||
end,
|
||||
},
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = false, -- Évite flicker en insert
|
||||
severity_sort = true,
|
||||
})
|
||||
29
config/nvim/lua/neoconf/plugins_settings.lua
Normal file
29
config/nvim/lua/neoconf/plugins_settings.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
-- treesitter
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "<filetype>" },
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
vim.wo[0][0].foldmethod = "expr"
|
||||
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
|
||||
-- Auto-cd + exécution Python
|
||||
vim.keymap.set("n", "<leader>rr", "<cmd>ToggleTerm direction=float size=20<cr>", { desc = "Run Python" })
|
||||
vim.keymap.set("n", "<leader>rp", function()
|
||||
local term = require("toggleterm.terminal").Terminal:new({
|
||||
cmd = "cd " .. vim.fn.expand("%:p:h") .. " && python " .. vim.fn.expand("%"),
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
close_on_exit = false,
|
||||
})
|
||||
term:toggle()
|
||||
end, { desc = "Python Run" })
|
||||
|
||||
-- ultisnips
|
||||
vim.g.UltiSnipsExpandOrJumpTrigger = "<tab>"
|
||||
vim.g.UltiSNipsListSnippets = "<c-tab>"
|
||||
vim.g.UltiSnipsJumpBackwardTrigger = "<c-b>"
|
||||
65
config/nvim/lua/neoconf/remap.lua
Normal file
65
config/nvim/lua/neoconf/remap.lua
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
-- (.config/nvim/lua/neoconf/remap.lua)
|
||||
-- leader = space
|
||||
-- C = ctrl
|
||||
-- clear highlights when typing esc
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
-- diagnostic keymaps
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||
-- exit terminal mode (or ctrl C)
|
||||
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||
-- disable arrow keys
|
||||
vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
|
||||
-- ctrl hjkl for moving between windows
|
||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||
-- telescope
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Telescope live grep" })
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Telescope buffers" })
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Telescope help tags" })
|
||||
-- oil
|
||||
vim.keymap.set("n", "<leader>n", "<cmd>Oil<CR>", { desc = "Launch oil buffer" })
|
||||
-- csv
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cv",
|
||||
":CsvViewToggle delimiter=; display_mode=border header_lnum=1<CR>",
|
||||
{ desc = "Toggle CSV view" }
|
||||
)
|
||||
-- python
|
||||
vim.keymap.set("n", "<F5>", ":w<CR>:!python3 %<CR>", { noremap = true, silent = false })
|
||||
|
||||
-- spell checker from fr to en
|
||||
vim.keymap.set("n", "<leader>sf", function()
|
||||
if vim.o.spelllang == "fr" then
|
||||
vim.o.spelllang = "en"
|
||||
else
|
||||
vim.o.spelllang = "fr"
|
||||
end
|
||||
vim.o.spell = true
|
||||
print("Spelllang: " .. vim.o.spelllang)
|
||||
end, { desc = "Toggle spelllang FR/EN" })
|
||||
-- toggle correction
|
||||
vim.keymap.set("n", "<leader>sg", function()
|
||||
vim.wo.spell = not vim.wo.spell
|
||||
vim.notify("Spell: " .. (vim.wo.spell and "ON" or "OFF"), vim.log.levels.INFO)
|
||||
end, { desc = "Toggle spell check" })
|
||||
|
||||
-- toggle split view markdown
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>m",
|
||||
"<CMD>Markview splitToggle<CR>",
|
||||
{ desc = "Toggles `splitview` for current buffer." }
|
||||
)
|
||||
|
||||
vim.api.nvim_create_user_command("OctaveRun", function()
|
||||
vim.cmd("write")
|
||||
vim.cmd('!octave -qf "%:p"')
|
||||
end, {})
|
||||
47
config/nvim/lua/neoconf/settings.lua
Normal file
47
config/nvim/lua/neoconf/settings.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
-- .config/nvim/lua/neoconf/settings.lua
|
||||
vim.g.have_nerd_font = true
|
||||
-- options
|
||||
-- enable line number
|
||||
vim.o.number = true
|
||||
-- relative line number
|
||||
vim.o.relativenumber = true
|
||||
-- dont show the mode
|
||||
vim.o.showmode = true
|
||||
-- sync clipboard
|
||||
vim.schedule(function()
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
end)
|
||||
-- enable break indent
|
||||
vim.o.breakindent = true
|
||||
-- indent options
|
||||
vim.o.autoindent = true
|
||||
vim.o.smartindent = true
|
||||
vim.o.expandtab = true
|
||||
-- save undo history
|
||||
vim.o.undofile = true
|
||||
-- case insensitive search
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
-- keep signcolumn
|
||||
vim.o.signcolumn = "yes"
|
||||
-- config new split opening
|
||||
vim.o.splitright = true
|
||||
vim.o.splitbelow = true
|
||||
-- whitespace char display
|
||||
vim.o.list = true
|
||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||
-- preview substitutions live with !
|
||||
vim.o.inccommand = "split"
|
||||
-- show line cursor
|
||||
vim.o.cursorline = true
|
||||
-- min lines above and below cursor
|
||||
vim.o.scrolloff = 10
|
||||
-- confirm save/confirm
|
||||
vim.o.confirm = true
|
||||
-- spell checking
|
||||
vim.opt.spell = true
|
||||
vim.opt.spelllang = "fr"
|
||||
|
||||
vim.cmd([[colorscheme tokyonight-storm]])
|
||||
-- others
|
||||
vim.g.python3_host_prog = "/usr/bin/python3"
|
||||
1105
config/nvim/markdown.css
Normal file
1105
config/nvim/markdown.css
Normal file
File diff suppressed because it is too large
Load diff
3
config/nvim/spell/en.utf-8.add
Normal file
3
config/nvim/spell/en.utf-8.add
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
discretizing
|
||||
timesteps
|
||||
Possibilistic
|
||||
BIN
config/nvim/spell/en.utf-8.add.spl
Normal file
BIN
config/nvim/spell/en.utf-8.add.spl
Normal file
Binary file not shown.
3
config/nvim/spell/fr.utf-8.add
Normal file
3
config/nvim/spell/fr.utf-8.add
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Discretization
|
||||
discretized
|
||||
discretization
|
||||
BIN
config/nvim/spell/fr.utf-8.add.spl
Normal file
BIN
config/nvim/spell/fr.utf-8.add.spl
Normal file
Binary file not shown.
BIN
config/nvim/spell/fr.utf-8.spl
Normal file
BIN
config/nvim/spell/fr.utf-8.spl
Normal file
Binary file not shown.
BIN
config/nvim/spell/fr.utf-8.sug
Normal file
BIN
config/nvim/spell/fr.utf-8.sug
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue