Skip to content

Commit a3bad06

Browse files
committed
feat: better dev + ignoring certain servers (just eslint for now)
1 parent 6710864 commit a3bad06

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

after/plugin/fugitive.lua

-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ autocmd("BufWinEnter", {
77
group = ThePrimeagen_Fugitive,
88
pattern = "*",
99
callback = function()
10-
print("help", vim.bo.ft)
1110
if vim.bo.ft ~= "fugitive" then
1211
return
1312
end
1413

1514
local bufnr = vim.api.nvim_get_current_buf()
1615
local opts = {buffer = bufnr, remap = false}
17-
print("great success", vim.bo.ft, bufnr, vim.inspect(opts))
1816
vim.keymap.set("n", "<leader>p", function()
1917
vim.cmd [[ Git push ]]
2018
end, opts)

after/plugin/lsp.lua

+23-3
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,37 @@ local cmp_mappings = lsp.defaults.cmp_mappings({
1818
["<C-Space>"] = cmp.mapping.complete(),
1919
})
2020

21-
lsp.set_preferences({
22-
sign_icons = { }
23-
})
21+
-- disable completion with tab
22+
-- this helps with copilot setup
23+
cmp_mappings['<Tab>'] = nil
24+
cmp_mappings['<S-Tab>'] = nil
2425

2526
lsp.setup_nvim_cmp({
2627
mapping = cmp_mappings
2728
})
2829

30+
lsp.set_preferences({
31+
suggest_lsp_servers = false,
32+
sign_icons = {
33+
error = 'E',
34+
warn = 'W',
35+
hint = 'H',
36+
info = 'I'
37+
}
38+
})
39+
40+
vim.diagnostic.config({
41+
virtual_text = true,
42+
})
43+
2944
lsp.on_attach(function(client, bufnr)
3045
local opts = {buffer = bufnr, remap = false}
3146

47+
if client.name == "eslint" then
48+
vim.cmd [[ LspStop eslint ]]
49+
return
50+
end
51+
3252
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
3353
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
3454
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)

dev

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
rm -rf ~/.config/nvim
4+
ln -s $(pwd) ~/.config/nvim
5+

0 commit comments

Comments
 (0)