enable lsp + a bunch of other things

This commit is contained in:
2025-11-15 23:40:52 -05:00
parent 5f6a4907f3
commit 4c1a71c1df
11 changed files with 63 additions and 6 deletions

View File

@@ -19,7 +19,21 @@ vim.keymap.set('n', "<leader>qq", "<cmd>q!<CR>", { desc = "Force to quit without
-- TERMINAL
-- exit t mode
km("t", "<Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode"})
km("n", "<leader>t" , "<cmd>term<CR>", { desc = "Create a terminal" } )
km("n", "<leader>t" , function()
print("open terminal")
-- function OpenTerminal()
local dir = vim.fn.expand('%:p:h') -- if in a file
if vim.startswith(dir, 'oil://') then -- if in an Oil buffer
dir = string.sub(dir, 7) -- Strip 'oil://' prefix
if vim.api.nvim_buf_get_option(0, "buftype") == "nofile" then -- is in a float
vim.cmd.q()
end
end
vim.cmd('lcd ' .. dir)
vim.cmd('terminal')
end
, { desc = "Create a terminal in the current 'context'" }
)
-- todo: this is not robust... add autocompletion and verify that file exists

0
lua/config/lsp.lua Normal file
View File

View File

@@ -6,8 +6,8 @@ vim.o.smartcase = true
-- use vim
--vim.o.expandtab = true -- convert tab to spaces
--vim.o.shiftwidth = 4
vim.o.expandtab = true -- convert tab to spaces
vim.o.shiftwidth = 4
vim.o.cursorline = true