Put all files in a dir.
This commit is contained in:
0
home/dot_config/lvim/ftplugin/.keep
Normal file
0
home/dot_config/lvim/ftplugin/.keep
Normal file
49
home/dot_config/lvim/ftplugin/python.lua
Normal file
49
home/dot_config/lvim/ftplugin/python.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
--[[--
|
||||
File : conf.d/lvim/ftplugin/python.lua
|
||||
Author : Jeff Lance <email@jefflance.me>
|
||||
Date : 06.08.2023 12:46:43
|
||||
Last Modified Date: 08.08.2023 19:23:05
|
||||
Last Modified By : Jeff Lance <email@jefflance.me>
|
||||
--]]
|
||||
--
|
||||
|
||||
|
||||
|
||||
-- Setup debug adapter
|
||||
--
|
||||
lvim.builtin.dap.active = true
|
||||
local mason_path = vim.fn.glob(vim.fn.stdpath "data" .. "/mason/")
|
||||
pcall(function()
|
||||
require("dap-python").setup(mason_path .. "packages/debugpy/venv/bin/python")
|
||||
end)
|
||||
|
||||
-- Setup testing
|
||||
--
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
-- Extra arguments for nvim-dap configuration
|
||||
-- See https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for values
|
||||
dap = {
|
||||
justMyCode = false,
|
||||
console = "integratedTerminal",
|
||||
},
|
||||
args = { "--log-level", "DEBUG", "--quiet" },
|
||||
runner = "pytest",
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
-- Linters
|
||||
--
|
||||
local linters = require("lvim.lsp.null-ls.linters")
|
||||
linters.setup({
|
||||
{ command = "flake8", filetypes = { "python" } },
|
||||
})
|
||||
|
||||
-- Formatters
|
||||
--
|
||||
local formatters = require("lvim.lsp.null-ls.formatters")
|
||||
formatters.setup({
|
||||
{ name = "black" },
|
||||
})
|
||||
76
home/dot_config/lvim/ftplugin/tex.lua
Normal file
76
home/dot_config/lvim/ftplugin/tex.lua
Normal file
@@ -0,0 +1,76 @@
|
||||
--[[--
|
||||
File : conf.d/lvim/ftplugin/tex.lua
|
||||
Author : Jeff Lance <email@jefflance.me>
|
||||
Date : 06.08.2023 11:07:22
|
||||
Last Modified Date: 15.08.2023 00:46:47
|
||||
Last Modified By : Jeff Lance <email@jefflance.me>
|
||||
--]]
|
||||
--
|
||||
|
||||
|
||||
|
||||
local opts = {}
|
||||
|
||||
local status_ok, whk = pcall(require, "which-key")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- Shortcuts
|
||||
--
|
||||
-- old way making the LaTeX menu appears with the LSP and Lunar one
|
||||
-- whk.register {
|
||||
-- ["<leader>L"] = {
|
||||
-- name = "LSP, Lunar, LaTeX", -- we edit the title of the L shortcut
|
||||
-- }
|
||||
-- }
|
||||
|
||||
vim.g.maplocalleader = " " -- we define a leader available only from tex files
|
||||
|
||||
whk.register {
|
||||
["<localleader>l"] = {} -- empties the default VimTeX menu mapping
|
||||
}
|
||||
|
||||
whk.register {
|
||||
["<localleader>"] = { -- to set a completly new using only the localleader key
|
||||
name = " LaTeX",
|
||||
c = { "<cmd>VimtexCompileSS<CR>", "Single-shot compile project" },
|
||||
C = {
|
||||
name = " Compile",
|
||||
s = { "<cmd>VimtexStop<CR>", "Stop compile" },
|
||||
c = { "<cmd>VimtexCompileSelected<CR>", "Compile Selected" },
|
||||
},
|
||||
d = { "<cmd>VimtexDocPackage<CR>", "Open Doc for package" },
|
||||
e = { "<cmd>VimtexErrors<CR>", "Look at the errors" },
|
||||
m = { "<cmd>VimtexToggleMain<CR>", "Toggle Main" },
|
||||
o = { "<cmd>VimtexView<CR>", "View pdf" },
|
||||
s = { "<cmd>VimtexStatus<CR>", "Look at the status" },
|
||||
T = {
|
||||
name = " TOC",
|
||||
o = { "<cmd>VimtexTocOpen<CR>", "Open TOC" },
|
||||
t = { "<cmd>VimtexTocToggle<CR>", "Toggle TOC" },
|
||||
},
|
||||
V = {
|
||||
name = " VimTeX",
|
||||
c = { "<CMD>edit /home/jeff/.config/lvim/ftplugin/tex.lua<CR>", "Edit configuration" },
|
||||
s = { "<CMD>edit /home/jeff/.config/lvim/luasnippets/tex.lua<CR>", "Edit snippets" },
|
||||
i = { "<cmd>VimtexInfo<CR>", "Vimtex Info" },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- Linters
|
||||
--
|
||||
local linters = require("lvim.lsp.null-ls.linters")
|
||||
linters.setup({
|
||||
{ command = "chktex", filetypes = { "tex" } },
|
||||
})
|
||||
|
||||
-- Formatters
|
||||
--
|
||||
local formatters = require("lvim.lsp.null-ls.formatters")
|
||||
formatters.setup({
|
||||
{ command = "latexindent", filetypes = { "tex" } },
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user