mirror of https://github.com/E-Almqvist/dotfiles
Compare commits
No commits in common. 'f7f53d03d2ef47187a1c39c0f360781ea17e6558' and '7219f02482d1ba4ba252927c59acaf5dfa9916a1' have entirely different histories.
f7f53d03d2
...
7219f02482
@ -1,22 +0,0 @@ |
||||
local on_attach = require("nvchad.configs.lspconfig").on_attach |
||||
local on_init = require("nvchad.configs.lspconfig").on_init |
||||
local capabilities = require("nvchad.configs.lspconfig").capabilities |
||||
|
||||
local lspconfig = require "lspconfig" |
||||
local servers = { "html", "cssls", "tsserver", "clangd", "ghdl_ls", "hls", "tailwindcss", "pyright", "julials" } |
||||
|
||||
-- lsps with default config |
||||
for _, lsp in ipairs(servers) do |
||||
lspconfig[lsp].setup { |
||||
on_attach = on_attach, |
||||
on_init = on_init, |
||||
capabilities = capabilities, |
||||
} |
||||
end |
||||
|
||||
-- typescript |
||||
lspconfig.tsserver.setup { |
||||
on_attach = on_attach, |
||||
on_init = on_init, |
||||
capabilities = capabilities, |
||||
} |
@ -0,0 +1,18 @@ |
||||
local on_attach = require("plugins.configs.lspconfig").on_attach |
||||
local capabilities = require("plugins.configs.lspconfig").capabilities |
||||
|
||||
local lspconfig = require("lspconfig") |
||||
|
||||
-- if you just want default config for the servers then put them in a table |
||||
local servers = { "html", "cssls", "tsserver", "clangd", "ghdl_ls", "hls", "tailwindcss", "pyright", "julials" } |
||||
|
||||
for _, lsp in ipairs(servers) do |
||||
lspconfig[lsp].setup({ |
||||
on_attach = on_attach, |
||||
capabilities = capabilities, |
||||
}) |
||||
end |
||||
|
||||
-- |
||||
-- lspconfig.pyright.setup { blabla} |
||||
-- |
@ -0,0 +1,66 @@ |
||||
local M = {} |
||||
|
||||
M.treesitter = { |
||||
ensure_installed = { |
||||
"vim", |
||||
"lua", |
||||
"html", |
||||
"css", |
||||
"javascript", |
||||
"typescript", |
||||
"tsx", |
||||
"c", |
||||
"markdown", |
||||
"markdown_inline", |
||||
"prisma", |
||||
"haskell", |
||||
"python", |
||||
"zig", |
||||
}, |
||||
indent = { |
||||
enable = true, |
||||
-- disable = { |
||||
-- "python" |
||||
-- }, |
||||
}, |
||||
} |
||||
|
||||
M.mason = { |
||||
ensure_installed = { |
||||
-- lua stuff |
||||
"lua-language-server", |
||||
"stylua", |
||||
|
||||
-- web dev stuff |
||||
"css-lsp", |
||||
"html-lsp", |
||||
"typescript-language-server", |
||||
"deno", |
||||
"prettier", |
||||
|
||||
-- c/cpp stuff |
||||
"clangd", |
||||
"clang-format", |
||||
|
||||
-- Fun/joke langs |
||||
"hls", |
||||
}, |
||||
} |
||||
|
||||
-- git support in nvimtree |
||||
M.nvimtree = { |
||||
git = { |
||||
enable = true, |
||||
}, |
||||
|
||||
renderer = { |
||||
highlight_git = true, |
||||
icons = { |
||||
show = { |
||||
git = true, |
||||
}, |
||||
}, |
||||
}, |
||||
} |
||||
|
||||
return M |
@ -0,0 +1,12 @@ |
||||
-- local autocmd = vim.api.nvim_create_autocmd |
||||
|
||||
-- Auto resize panes when resizing nvim window |
||||
-- autocmd("VimResized", { |
||||
-- pattern = "*", |
||||
-- command = "tabdo wincmd =", |
||||
-- }) |
||||
vim.filetype.add({ |
||||
extension = { |
||||
mdx = 'mdx' |
||||
} |
||||
}) |
@ -0,0 +1,38 @@ |
||||
---@type MappingsTable |
||||
local M = {} |
||||
|
||||
M.general = { |
||||
n = { |
||||
[";"] = { ":", "enter command mode", opts = { nowait = true } }, |
||||
|
||||
-- format with conform |
||||
["<leader>fm"] = { |
||||
function() |
||||
require("conform").format() |
||||
end, |
||||
"formatting", |
||||
}, |
||||
}, |
||||
|
||||
v = { |
||||
-- Indentation |
||||
[">"] = { ">gv", "indent" }, |
||||
-- Move selection up/down with K/J |
||||
["J"] = { ":m '>+1<CR>gv=gv", "move selection down" }, |
||||
["K"] = { ":m '<-2<CR>gv=gv", "move selection up" }, |
||||
}, |
||||
|
||||
i = { |
||||
["<C-l>"] = { |
||||
function() |
||||
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "") |
||||
end, |
||||
"Copilot Accept", |
||||
{ replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true }, |
||||
}, |
||||
}, |
||||
} |
||||
|
||||
-- more keybinds! |
||||
|
||||
return M |
@ -1,25 +0,0 @@ |
||||
---@type MappingsTable |
||||
|
||||
require "nvchad.mappings" |
||||
|
||||
local map = vim.keymap.set |
||||
|
||||
-- General |
||||
map("n", ";", ":", { desc = "enter command mode", nowait = true }) |
||||
|
||||
-- Format with conform |
||||
map("n", "<leader>fm", function() |
||||
require("conform").format() |
||||
end, { desc = "formatting" }) |
||||
|
||||
-- Indentation in visual mode |
||||
map("v", ">", ">gv", { desc = "indent" }) |
||||
|
||||
-- Move selection up/down with K/J in visual mode |
||||
map("v", "J", ":m '>+1<CR>gv=gv", { desc = "move selection down" }) |
||||
map("v", "K", ":m '<-2<CR>gv=gv", { desc = "move selection up" }) |
||||
|
||||
-- Copilot accept in insert mode |
||||
map("i", "<C-l>", function() |
||||
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "") |
||||
end, { desc = "Copilot Accept", replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true }) |
@ -1,6 +0,0 @@ |
||||
require "nvchad.options" |
||||
|
||||
-- add yours here! |
||||
|
||||
-- local o = vim.o |
||||
-- o.cursorlineopt ='both' -- to enable cursorline! |
Loading…
Reference in new issue